Created
March 31, 2009 17:41
-
-
Save wmoxam/88296 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class ControllerHelper | |
include Singleton | |
include ActionView::Helpers | |
end | |
def url_helpers | |
ControllerHelper.instance | |
end | |
Then in any controller you want to use a url helper, ex: | |
flash[:success] = "Go here: #{url_helpers.link_to 'foo', foo_path}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment