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

Leaves - Elizabeth #33

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

Leaves - Elizabeth #33

wants to merge 17 commits into from

Conversation

north108
Copy link

@north108 north108 commented Oct 7, 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 The model is communicating with the controller and the database and returning information from the database to the controller.
Describe in your own words what the Controller is doing in Rails The controller is taking directions from the router and getting the information the router asks for from the model or the view.
Describe in your own words what the View is doing in Rails The view is receiving information from the controller about what to display in the browser.
Describe an edge-case controller test you wrote I wrote tests to make sure that methods would redirect after they completed. This is an edgecase because the method could work but not redirect to the correct path afterwards.
What is the purpose of using strong params? (i.e. the params method in the controller) The purpose is that you don't have to type the params hash as much and it makes them private because we don't always want the user going in and changing things.
How are Rails migrations related to Rails models? When you create a model it creates a pending migration about what the database should look like. Migrations make sure that the code is asking for the correct items from the database and that those items exist in the database.
Describe one area of Rails that are still unclear on Testing is still a bit fuzzy for me. That was the hardest part for me.

@dHelmgren
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 see comment
Routes follow RESTful conventions yes
Uses named routes (like _path) yes
Overall Good job on Task List! It functions as expected! You hit all of the learning goals: using partials, using strong params, and following Rails conventions.

it 'will decrease the count of the tasks in the database by 1' do
expect{delete task_path(@task.id)}.must_differ 'Task.count', -1

must_respond_with :redirect

Choose a reason for hiding this comment

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

What if the ID is invalid?


expect(@task.completion_date).must_be_nil
must_respond_with :redirect
must_redirect_to tasks_path

Choose a reason for hiding this comment

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

What if the ID is invalid?

get '/tasks/:id', to: 'tasks#show', as: 'task'
get '/tasks/:id/edit', to: 'tasks#edit', as: 'edit_task'
patch '/tasks/:id', to: 'tasks#update'
delete '/tasks/:id', to: 'tasks#destroy'

Choose a reason for hiding this comment

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

In the future, I'd like to see you using resources to dry this up!

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