Skip to content

Instantly share code, notes, and snippets.

@balinterdi
Forked from wmoxam/gist:88296
Created May 26, 2009 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balinterdi/118126 to your computer and use it in GitHub Desktop.
Save balinterdi/118126 to your computer and use it in GitHub Desktop.
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