The rails helpers are supposed to be view helpers.
You will notice that the following code :
class MyController < ApplicationController
helper :my
end
will make the methods in MyHelper
available to the views, but not to your controller actions. include MyHelper
will make the helper methods available in the controller.
Summarized :
helper :my
and you can use the helpers in your views
include MyHelper
and you can use the helpers in your controller
I explained a bit more, but you already answered your question :
class EventMailer < ActionMailer::Base
include MailerHelper
helper :mailer
# rest of the code goes here ...
end
will do what you want and allow you to use your helper in both your mailer and your views.
Hope this helps.