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_Ga-Young #38

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

Leaves_Ga-Young #38

wants to merge 22 commits into from

Conversation

gyjin
Copy link

@gyjin gyjin 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 holds the database and its logic of the website. It searches through the database and returns the info the controller wanted.
Describe in your own words what the Controller is doing in Rails The controller asks the model for certain information and then passes that to the view to be able to show that visually on a webpage.
Describe in your own words what the View is doing in Rails The view takes the information passed to it from the controller and displays a webpage to the requester.
Describe an edge-case controller test you wrote I created a test to make sure the website redirects the user to the main page if the user tries to edit a task that doesn't exist.
What is the purpose of using strong params? (i.e. the params method in the controller) The purpose of strong params is to allow the database to only accept certain parameters so that random (or probably malicious) parameters are not introduced or important parameters are changed.
How are Rails migrations related to Rails models? Rails migrations are used to changed or create new Rails models.
Describe one area of Rails that are still unclear on I'm having trouble mushing HTML and Ruby together in the .html.erb files. I understand the concept but I'm struggling with the syntax.

@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.

before do
@completed_task = Task.create(name: "wash car", description: "rinse and wash", completed: DateTime.now)
end

Choose a reason for hiding this comment

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

What if we are missing the ID!

must_redirect_to tasks_path
end

it "will redirect to main page if given an invalid id" do

Choose a reason for hiding this comment

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

Good work!

Comment on lines +4 to +11
# The following is included in resources
# get '/tasks', to: 'tasks#index', as: 'tasks'
# get '/tasks/new', to: 'tasks#new', as: 'new_task'
# post '/tasks', to: 'tasks#create'
# 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.

A good note, but in the future, delete this! :) If you ever forget what routes you have rails routes is your friend

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