How do i do this:
def helpers
Helper.instance
end
class Helper
include ActionView::Helpers::TextHelper
include ActionView::Helpers::SanitizeHelper
end
def index
@message = "Sanitized #{helpers.sanitize(...)}"
end
These names put your helpers on the controller, for example, by extending the inner class. Hope this helps!
source
share