On Tuesday, 25 September 2012 03:39:10 UTC-4, Kashif Umair Liaqat wrote:
>
> You can use resources in following three different ways.
>
> resources :users
>
> All the methods in Users controller will have routes defined if you add 
> above line in your routes.rb file. For example users controller have method 
> #index then you will be able to open the url http://localhost:3000/users.
>

Not quite - only the 7 standard actions (new / create / show / index / edit 
/ update / destroy) will be routed. You can write URLs that look like they 
go to other actions (/users/some_other_thing) but they'll actually be 
routed to the show action.
 
The Routing guide is a great reference for this stuff:

http://guides.rubyonrails.org/routing.html

--Matt Jones

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/xk3HMCLrR38J.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to