Skip to content

Conversation

@sophearychiv
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 Model is a class that can add data into the database. It's created when we use 'rails generate model' command.
Describe in your own words what the Controller is doing in Rails The controller coordinates the communications between the user's browser, model and the views.
Describe in your own words what the View is doing in Rails The View displays the data to the user's browser.
Describe an edge-case controller test you wrote When testing for an invalid task id.
What is the purpose of using strong params? (i.e. the params method in the controller) To pass the data into the params without having to list all the attributes.
How are Rails migrations related to Rails models? Rails models need to be created first before running Rails migrations. Rails models create data which can be changed by Rails migrations.
Describe one area of Rails that are still unclear on How is the Update action in the controller triggered when we submit the edit task button?

@CheezItMan
Copy link

Task List

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in Check, good number of commits and good commit messages
Answered comprehension questions Check, I think we talked about the update action, how form_with figures out it needs to make a patch request if the model it was given has an ID field.
Successfully handles: Index, Show Check
Index & Show tests pass Check
Successfully handles: New, Create Check
New & Create tests pass Check
Successfully handles: Edit, Update Check
Tests for Edit & Update test valid & invalid task ids Check
Successfully handles: Destroy, Task Complete Check
Tests for Destroy & Task Complete include tests for valid and invalid task ids Check
Routes follow RESTful conventions Check
Uses named routes (like _path) Check
Overall Well done, you hit all the learning goals for the project. Excellent work.


if @task.nil?
# to pass the test. I'm wondering why it redirects instead of giving a 404 page.
redirect_to tasks_path, :flash => { :error => "Task id: #{params[:id]} not found!" }

Choose a reason for hiding this comment

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

Nice !!! 💯

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