In rails, the controller.action_methods returns methods even if they have no associated routes

321 Views Asked by At

For resourceful controllers, calling the controller.action_methods is yielding all the possible action methods on the controller. I have a resource for which I have restricted the routes to [:only=> "index"].

I am looking for a method similar to controller.action_methods that will help me determine if a given action method has an associated routes.

I am trying to dynamically go to reach the urls within a controller. I can always write a rescue block, but if someone is aware of a better solution, please share.

Thanks, Tabrez

0

There are 0 best solutions below