Hi All It seems that helper methods defined in application.rb are no longer available to my ActionMailer templates since upgrading to the latest version of rails. Is anyone else having this problem? Possible solutions? For now I''ve just re-defined the method I need right in the template source, but I''m sure there is more elegant way around. Craig Davey
On Aug 25, 2005, at 10:26 AM, Craig Davey wrote:> Hi All > > It seems that helper methods defined in application.rb are no longer > available to my ActionMailer templates since upgrading to the latest > version of rails. Is anyone else having this problem? Possible > solutions? > > For now I''ve just re-defined the method I need right in the template > source, but I''m sure there is more elegant way around.If you need the application helper to be accessible in your mailer: class MyMailer < ActionMailer::Base helper :application end By default, the application helper is _not_ automatically added to mailers. - Jamis
Sweet, thanks Jamis On 8/25/05, Jamis Buck <jamis-uHoyYlH2B+GakBO8gow8eQ@public.gmane.org> wrote:> On Aug 25, 2005, at 10:26 AM, Craig Davey wrote: > > > Hi All > > > > It seems that helper methods defined in application.rb are no longer > > available to my ActionMailer templates since upgrading to the latest > > version of rails. Is anyone else having this problem? Possible > > solutions? > > > > For now I''ve just re-defined the method I need right in the template > > source, but I''m sure there is more elegant way around. > > If you need the application helper to be accessible in your mailer: > > class MyMailer < ActionMailer::Base > helper :application > end > > By default, the application helper is _not_ automatically added to > mailers. > > - Jamis > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >