Skip to content

Conversation

@awilson2017
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 a like a Ruby class. It provides the template for creating entries into the database or the business logic
Describe in your own words what the Controller is doing in Rails The controller is the coordinator between the View and Model. If a view needs to change then it will 'contact' the controller and ask for it to execute a method, as needed.
Describe in your own words what the View is doing in Rails The view's code makes a webpage in the browser
What is the purpose of using strong params? (i.e. the params method in the controller) NA
How are Rails migrations related to Rails models? migrations update the database. If the database is updated then the model must be updated as well because the model provides the template for the database.
Describe one area of Rails that are still unclear on hmm. Many aspects of Rails are unclear. Our introductory week provided a step-by-step explanation of the actions to take without a deeper explanation of what is going on behind the scenes. I accepted this 'how-to' and now I want to understand the nuts-and-bolts of rails. My hope is we will ease our way into understanding the underlying logic.

…lity e.g. controller method and link on 'index' page is written.

Redirecting my work back to Wave 2 and the 'show' functionality.
…ded to DB, user is redirected to 'Home' page.
…ow' views so that the 'completed' status is a check box vs. a boolean word 'true' or 'false.'
…oring the 'Mark complete' functionality to meet requirements.
…nges are. My belief is they are small since I lack a clear memory of the changes.
…ia migration.

Now DB has all desired columns and all functionality is intact.
@droberts-sea
Copy link

Task List

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in yes
Answered comprehension questions yes
Successfully handles: Index, Show yes
Successfully handles: New, Create yes
Successfully handles: Edit, Update no - you can get the edit form, but the changes are not saved
Successfully handles: Destroy, Task Complete yes
Routes follow RESTful conventions mostly - see inline comment
Uses named routes (like _path) yes
Overall Good work overall!

get "/tasks/:id", to: "tasks#show", as: "task"
get "/tasks/:id/edit", to: "tasks#edit", as: "edit"
patch "/tasks/:id", to: "tasks#complete?", as: "complete_task"
patch "/tasks/:id", to: "tasks#update"

Choose a reason for hiding this comment

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

You've got the same verb/URL combo twice here! Because the router reads this file top-to-bottom looking for a match, this means the bottom route will never be used, and no request will be routed to the update action. I believe this is what's causing your update to not work.

To fix this, you would need to give the complete route a different URL - maybe /tasks/:id/mark_complete.

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