If you really want to use an existing Rails helper in your
controllers, do the following :
1. add the following the following code to your
application_controller (a singleton and a method):
class Helper
include Singleton
include ActionView::Helpers::DateHelper
include
Helper methods are used in the template class (ActionView::Template),
not controllers. If I'm reading the documentation right, putting
helper :all in a controller makes all helpers found in app/helpers/
**/*rb available in that controller's views.
On Oct 31, 3:48 pm, Great John
2 matches
Mail list logo