My activities, thoughts, inspiration, ideas, and everything else on Rails and PHP
Monday, October 17, 2011
Using helper method from action mailer views
Action Mailer of Ruby on Rails(RoR) allows you to send emails from application using a mailer model and views. Sometimes you may need to use any helper method though it does not allow by default. In that case you have to include helper(module) in the Mailer class.
Say, you may need to use method(s) from ProductsHelper module, then you need to write following line in the Mailer file which will provide accessibility to use all methods written in ProductsHelper