1. just replace the word “scaffold” with the word “model”
2. from general to specific (‘/ads/’ and then ‘/ads/:id’)
3. rails generate migration AddPhoneToTickets phone:string
4. do |f| (where “f” can be anything)
from general to specific (‘/ads/’ and then ‘/ads/:id’)
1. from general to specific (‘/ads/’ and then ‘/ads/:id’)
2. map.connect ‘/ads/:id’, :controller=>’ads’, :action=>’show’
3. include test.xml to root of “public” folder and ,render (:partial=>’map’, :locals=>{:data=>’/test.xml’})
4. form_for(@object, :url=>{:action=>’create’})
map.connect ‘/ads/:id’, :controller=>’ads’, :action=>’show’
1. all important data is a resource2. every resource has a proper name (URL)
2. :format (that period is a concatenation period)
3. the method within the controller to call
4. login method (that checks a username and password) and 2. a filter (that calls the login method when needed)
login method (that checks a username and password) and 2. a filter (that calls the login method when needed)
1. underscores
2. it runs its validators
3. it is not associated with a model
4. their names begin with an underscore
their names begin with an underscore
1. right after the line introducing the class in the controller
2. a script that alters the structure of the underlying database
3. it can do more complex things like modifying the database structure and running tests
4. expression is ruby code that prints out a value in html
it can do more complex things like modifying the database structure and running tests
1. because they make the partial less dependent on other code
2. the data being presented by the web page
3. their names begin with an underscore
4. the request parameters table
because they make the partial less dependent on other code
1. controller
2. CamelCase
3. flight_id
4. singular
singular
1. rails generate migration AddPhoneToTickets phone:string
2. rails records the latest timestamp of all the migrations it runs (and runs only the latest ones)
3. because they make the partial less dependent on other code
4. it can do more complex things like modifying the database structure and running tests
rails records the latest timestamp of all the migrations it runs (and runs only the latest ones)
1. in the controller: respond_to do |format| … end
2. it is not associated with a model
3. redirect_to ” … ”
4. the data being presented by the web page
in the controller: respond_to do |format| … end
1. ruby make
2. f.error_messages
3. for ad in @ads
4. underscores
f.error_messages