On Mon, 2007-06-04 at 11:38 -0700, plewizard wrote:> i''m having a problem using custom helpers in mailing templates.
> because action mailer never uses a controller it doesn''t inherit
the
> helper module and i sadly can also not use the helpers from the
> controller than calls the deliver method. this seems like a
> shortcoming, not a feature.
>
> anybody come up with a work around. i know you can use rails default
> helpers like truncate, so it must be possible to stuff the custom ones
> somewhere.
>
Try adding:
include ActionView::Helpers::TextHelper
include ActionView::Helpers::TagHelper
include ApplicationHelper
to the class, or atleast the ApplicationHelper one. I haven''t tried
it,
but it may work.
--
Matthew Beale :: 607 227 0871
Resume & Portfolio @ http://madhatted.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---