Esdras Mayrink
2009-Jul-21 00:05 UTC
get member and collection actions of a given controller
Is there any easy way to do that? In a given controller or resource I want to get the routes or the actions of the controller, and I want to know if they are member or collection actions. When I have an action called search in a controller called posts, and in routes.rb I define this action as a collection action like this :collection => {:search => :get}, I want to make the following association: what_kind_of_action?(:search, :posts) than it should return :collection my english is horrible, my apologies thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---