Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HelperMailer < ActionMailer::Base
- def use_inline_css_hook_with_only_html_part
- mail_with_defaults do |format|
- format.html { render(:inline => TEST_HTML) }
- end
- end
- def use_inline_css_hook_with_text_and_html_parts
- mail_with_defaults do |format|
- format.html { render(:inline => TEST_HTML) }
- format.text { render(:inline => "Different Text Part") }
- end
- end
- def use_inline_css_hook_with_utf_8
- mail_with_defaults do |format|
- format.html { render(:inline => TEST_HTML_UTF8) }
- end
- end
- def inline_css_hook_with_base_url
- mail_with_defaults do |format|
- format.html { render(:inline => TEST_HTML_WITH_HOST) }
- end
- end
- protected
- def mail_with_defaults(&block)
- mail(:to => "test@localhost", :from => "[email protected]",
- :subject => "using helpers", &block)
- end
- end
Add Comment
Please, Sign In to add comment