Right now, I have the following in my application controller - and a
simliar version is duplicated in test_helper. There must be a better
way to include common functionality like this that gets used across
layers? Maybe at the very least a way to include it at the class
level and instance level with one line?
provide access to text helper at class level
def self.text_helper
Helper.instance
end
instance level
def text_helper
Helper.instance
end
include text_helper as singleton
class Helper
include Singleton
include ActionView::Helpers::TextHelper
end
- Rob