Get member and collection actions of a given controller

Is there any easy way to do that? In a given controller or resource I
to get the routes or the actions of the controller, and I want to know
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
=> {: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


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs