Skip to content

Instantly share code, notes, and snippets.

@chrislloyd
Created February 26, 2009 02:06
Show Gist options
  • Save chrislloyd/70589 to your computer and use it in GitHub Desktop.
Save chrislloyd/70589 to your computer and use it in GitHub Desktop.
require 'singleton'
class String
class TextHelperSingleton
include Singleton
include ActionView::Helpers::TextHelper
end
def method_missing(method, *args)
if TextHelperSingleton.instance.respond_to?(method)
TextHelperSingleton.instance.send(method, self, *args)
else
super
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment