Ruby On Rails, Design, Simplicity, Web 2.0, Ajax, Mac and Tons of Pizza.

Aug 13

Use helper functions in you email view

Posted by Sandro Paganotti in Ruby on Rails - comments are closed digg this add to delicious

As I found on this technoweenie post there is an undocumented function that let you use your helpers while styling your emails.

The sintax is pretty simple and must be added to your ActionMailer model:



class Emailer < ActionMailer::Base

  helper :application
  ...

end


After this you will be able to use the functions avaiable in the named helper into your email templates. Easy isn’t it?

Sandro

Comments

  • Joycie

    Posted on September 30

    How can I delete addresses and other info in an email that I've received and want to forward?
  • prasad

    Posted on October 03

    dis is from action mail

Post a comment

Categories:

Tags:

Powered by Mephisto, Valid XHTML 1.1, Valid CSS - Supported by Wave Factory