Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.