Rails Resource controllers
Newbie question:
(Apologies if this had been already discussed somewhere. I did try
searching for but did not find the info)
The Route file defines the following resource: resources :photos
Per
http://guides.rubyonrails.org/routing.html#resource-routing-the-rails-default
the above statement will define 7 routes corresponding to HTTP verbs. All
good till now! But no method other than "show" is defined in the
PhotosControllers class.
My Confusion is: As none of the other methods
(index/create/edit/destroy/..) are defined in the controller class, if the
user types in /photos/new or /photos, etc. which method(s) will handle
these request?
No comments:
Post a Comment