Created
July 30, 2009 00:52
-
-
Save klochner/158484 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_public_action_urls(controller) | |
controller_name = (/(\S+)_controller/).match(controller.name.underscore)[1] | |
controller.action_methods.select { |m| | |
url_for(:controller= >controller_name, | |
:action=>m, | |
:method=>:get, | |
:host=>APP_CONFIG['settings']['domain'] | |
) rescue nil}.collect do |m| | |
url_for :controller=>controller_name, | |
:action=>m,:host=>APP_CONFIG['settings']['domain'] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment