Skip to content

Instantly share code, notes, and snippets.

@technicalpickles
Created October 30, 2012 01:01
Show Gist options
  • Save technicalpickles/3977685 to your computer and use it in GitHub Desktop.
Save technicalpickles/3977685 to your computer and use it in GitHub Desktop.
Inspecting a controller's action methods
1.9.3p194 :016 > UsersController.action_methods
=> #<Set: {"_callback_before_128", "_callback_before_130", "show", "me", "new", "create", "edit", "update", "destroy"}>
1.9.3p194 :017 > UsersController.action_methods.reject {|m| m =~ /^_callback_/ }
=> ["show", "me", "new", "create", "edit", "update", "destroy"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment