Tuesday, February 26, 2008
Instance variable in viewer for ActionMailer
Using the ActionMailer in your Ruby on Rails application, I wanted to display a variable in the viewer. If the content_type is "text/html", the body needs to have the instance variable symbol e.g. body :var => var. In the viewer, you may reference this variable with <%= @var %>.