- What are the 7 RESTful routes (HTTP Verb + URL)? What is the purpose of each action?
- What is the MVC Paradigm?
- What are the responsibilities of the Models?
- What are the responsibilities of the Views?
- What are the responsibilities of the Controllers?
- How are the values of the params hash assigned? How are the keys assigned?
- Between a user and a programmer, who has control over the keys?
- What about the values?
- An example of a route in Rails looks like the following:
get '/hats', to: 'hats#index'
. What are the four parts of that route and what is the responsibility of each part?
- What does the
resources
keyword in routes do for us?
- There are 4 generic path helpers that come from Rails. Which of the 4 requires an argument? Which does not?
- Which of the 7 RESTful actions require you to find an instance from the database? Which does not?
- Which of the 7 RESTful actions alters the database and where do these actions get the necessary information from?
- When do we use <% %> vs <%= %>?
- What are some differences between
render
andredirect_to
?
- What are the arguments for a
link_to
? What are the arguments for abutton_to
? What are some differences between the two?
- A
form_for
is a form for something, i.e. a form_for takes something as an argument. What is that something?
- What does the
action
andmethod
keywords in a form do? How do we assign theaction
and themethod
for aform_for
and aform_tag
?
- When would be an appropriate time to use a
collection_select
? What are the four arguments that acollection_select
take?
- How do we show the associated objects of an object on a its show page? where does this helper method come from/where is it defined?
- When do validations occur? Where should we write them in our server?
- If the user fails to meet some validations, how do we give the user the feedback for why the database was not altered?