Skip to content

Conversation

@ChantalDemissie
Copy link

@ChantalDemissie ChantalDemissie commented Apr 15, 2019

Task List

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe in your own words what the Model is doing in Rails it is handling data and business logic
Describe in your own words what the Controller is doing in Rails The controller receives the request and processes it.
Describe in your own words what the View is doing in Rails The view renders the page as HTML.
Describe an edge-case controller test you wrote
What is the purpose of using strong params? (i.e. the params method in the controller) "This is a better security practice to help prevent accidentally allowing users to update sensitive model attributes". I had to look this up.
How are Rails migrations related to Rails models?
Describe one area of Rails that are still unclear on Flash errors, and still writing tests.

@ChantalDemissie
Copy link
Author

ignore make it better this was for hiroku

@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
Index & Show tests pass yes
Successfully handles: New, Create yes
New & Create tests pass yes
Successfully handles: Edit, Update yes
Tests for Edit & Update test valid & invalid task ids yes
Successfully handles: Destroy, Task Complete yes
Tests for Destroy & Task Complete include tests for valid and invalid task ids tests for destroy are good, but missing tests for mark_complete
Routes follow RESTful conventions not quite - the route for the new action doesn't match the RESTful pattern
Uses named routes (like _path) yes
Overall You have a strong start to Rails so far. There are a couple small places where things could be cleaned up, but in general I am happy with what I see. Keep up the hard work!

@task.update(
name: params[:task][:name],
description: params[:task][:description],
completion_date: params[:task][:completion_date]

Choose a reason for hiding this comment

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

You should be using strong params here and in create.

unless params.key?(:task)
@task = Task.new
else
@task = Task.new(

Choose a reason for hiding this comment

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

You have merged the create and new actions into one controller method. Separating them out like we did in class would make things a little more clear, especially as our controllers get more complex over the coming weeks.

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