views:

32

answers:

1

I have found a lot of information about adding form helper methods (see one of my other questions) but I cant find anything about adding helper methods as if they where defined in application_helper.rb

Ive tried basically copying application_helper.rb from a rails app into the gem but that didn't work.

Ive also tried:

class ActionView::Helpers

but that produces an error

+2  A: 

Create a module somewhere for your herlper methods:

module MyHelper
  def mymethod
  end
end

Mix it into ActionView::Base (such as in init.rb or lib/your_lib_file.rb)

ActionView::Base.send :include, MyHelper
tsdbrown