Hi, I was wondering if there is any way for retrieving the resource name from the request. Suppose I have the following resource definition in my routes.rb file: map.resources :pages, :controller => ''documents'' now, when the url /pages/ is requested with the GET method, the method ''index'' in the DocumentsController will be called and the resource name I would like to retrieve is :pages I know I could probably do this from the URI, but in case the :as option is used it wouldn''t work anymore: map.resources :pages, :controller => ''documents'', :as => ''foo'' Now, when the url /foo/ is called, the method index in the DocumentsController will be also called but the resource name should still be :pages Any hint? I looked at the ActionController::Routes classes but didn''t find anything useful... Thanks in advance -- /** * dagi3d v4 - http://dagi3d.net */ --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---