On Oct 23, 2:58 am, Joshua Muheim <[EMAIL PROTECTED]>
wrote:
> Frederick Cheung wrote:
> > On 22 Oct 2008, at 14:20, Joshua Muheim wrote:
>
> > That's normal. ActionMailer classes don't inherit from
> > ApplicationController so it is normal that the methods in there do not
> > magically appear in ActionMailer instances/views.
>
> > Fred
>
> Thanks for your reply. But this seems a little bit strange to me... All
> in all a view is a view, whether it's a "normal" or a mailer's one,
> right?

You're right, it's mostly an infratructure problem here. You just
can't steal methods defined in a completely separate place.
>
> So what can I do to access my helpers in the mailer's view?

One way would be to define them in a module which you include in
ApplicationController and in the mailer (Use the helper method in the
latter).

Fred
>
> Thanks
> --
> Posted viahttp://www.ruby-forum.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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to