List controller actions

Is there a way to list on a web page the current controller actions
define din the controller? Would like to put up a link for each
automatically.

On May 19, 2010, at 1:35 PM, Me wrote:

Is there a way to list on a web page the current controller actions
define din the controller? Would like to put up a link for each
automatically.

PagesController.instance_methods(false)
=> [“destroy”, “contact”, “list”, “show”, “expire_all”, “edit”,
“method_missing”]

You may need to edit down the list just a bit, as you can see. I
implemented a few methods in this class (like method_missing) that
should be actions that might not be appropriate in a list.

Good luck.

Cool forgot about the (false). Any way to get the respond_to formats
also

On May 19, 2010, at 2:01 PM, Chris H. wrote:

PagesController.instance_methods(false)
=> [“destroy”, “contact”, “list”, “show”, “expire_all”, “edit”, “method_missing”]

You may need to edit down the list just a bit, as you can see. I implemented a few methods in this class (like method_missing) that should be actions that might not be appropriate in a list.

Good luck.

Not sure what the respond_to formats are. Are you referring to whether
Rails renders a particular format like XML, etc.?

ya we have you know action.format set up, I was trying to auto set up
links
for each type.