Reputation: 267020
If I have a homecontroller, will the home_helper.rb get mixed into the controller class?
I'm assuming so as it gets access to the request object somehow.
Upvotes: 1
Views: 135
Reputation: 42863
No, helpers do not get mixed into controllers. You can hack rails but your best bet is to just include the method in application_helper.rb
This seems to be the best hack:
http://snippets.aktagon.com/snippets/47-Using-Rails-helpers-from-controllers-or-anywhere-you-want
Upvotes: 1