Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branches, Kristy #44

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Branches, Kristy #44

wants to merge 8 commits into from

Conversation

kristyh32
Copy link

Task List

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe in your own words what the Model is doing in Rails The model is representing a single instance of an object from the database. It is also handling any business logic.
Describe in your own words what the Controller is doing in Rails the controller talks to the Model and the View in order to decide what to give back to the user.
Describe in your own words what the View is doing in Rails The view has different html files that will be loaded depending on where the router tells the controller to look.
Describe an edge-case controller test you wrote An edge case test I wrote was trying to edit a task that was not found and expecting that it will redirect the user to the root page and give a flash error.
What is the purpose of using strong params? (i.e. the params method in the controller) strong params allow us to specify what attributes we want an object to have and adds a layer of security so that users cannot modify things that we don't want them to.
How are Rails migrations related to Rails models? migrations can make changes to the database schema and since models represent one instance of something from the database, the model will have to be updated to reflect any changes made to the db by the migrations.
Describe one area of Rails that are still unclear on I am unclear on how to apply different css stylesheets for different views in the program.

@tildeee
Copy link

tildeee commented Oct 15, 2019

Task List

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in x
Answered comprehension questions x
Successfully handles: Index, Show x
Index & Show tests pass x
Successfully handles: New, Create x
New & Create tests pass x
Successfully handles: Edit, Update x
Tests for Edit & Update test valid & invalid task ids x
Successfully handles: Destroy, Task Complete x
Tests for Destroy & Task Complete include tests for valid and invalid task ids x
Routes follow RESTful conventions x
Uses named routes (like _path) x
Overall

Well done on this project, Kristy! The app code and test code look great-- clean and functioning perfectly!

I've added only a few comments. That being said, this project was well done... keep up the good work!

task = params[:id]
@task = Task.find_by(id: task)
if @task.nil?
flash[:error] = "Could not find task with id: #{task}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably weren't able to use flash meaningfully-- we will learn about flash so very very soon!

end

# Complete for Wave 4
describe "toggle_complete" do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic tests for the toggle_complete functionality! The last remaining edge case is trying to do this with an invalid id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants