How to access application_helper methods in mailer templates

Hi,

I am not able to access application_helper methods in my mailer
templates.
It throws out error saying method not defined. I was assuming all
templates
under views should have access to application helper methods, but it is
not
the case. Any solution?


Anil

On 1/15/08, Anil W. [email protected] wrote:

Hi,

I am not able to access application_helper methods in my mailer templates.
It throws out error saying method not defined. I was assuming all templates
under views should have access to application helper methods, but it is not
the case. Any solution?

You can always put the methods in config/environment.rb.


Greg D.
http://destiney.com/

Add helper:application to the top of your Mailer class

for example:

class MessagingNotifier < ActionMailer::Base
helper :application


end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs