Model View Controller Route
/config/routes.rb
The URL and HTTP verb
The request state changes the intent.
[GET, POST, DELETE, PUT]
- Create - POST
- Read - GET
- Update - PUT
- Destroy - DELETE
Started GET "/products/new" for 127.0.0.1 at 2012-06-28 11:33:36 -0700
Processing by ProductsController#new as HTML
Rendered products/new.html.erb within layouts/application (0.4ms)
Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 0.0ms)
Was the request successful, why or why not? Yes. Line 4 states that the operation completed with the status of 200 OK.
What view file was rendered? products/new.html.erb
What path was this request to? /products/new
What Controller was used? ProductsController
7) Build a route based on the log entry in the last exercise that maps from the correct url and verb to the correct controller and view.
get '/products/new' => 'products#new'