Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added documentation for using helpers on mailer.

  • Loading branch information...
commit 49fb4cff65edec242b77dfbfec174823f051eb98 1 parent ac54862
Darío Javier Cravero authored January 04, 2013

Showing 1 changed file with 14 additions and 1 deletion. Show diff stats Hide diff stats

  1. 15  guides/padrino-mailer.textile
15  guides/padrino-mailer.textile
Source Rendered
@@ -211,4 +211,17 @@ email = pop_last_delivery
211 211
 assert_equal("Thanks for registering", email.subject)
212 212
 assert_equal("site@site.com", email.from.first)
213 213
 assert_equal(@user.email, email.to.first)
214  
-end
  214
+end
  215
+
  216
+h2. Using helpers in emails
  217
+
  218
+You can use any helpers, included Padrino Helpers, inside your emails.
  219
+
  220
+Just add some code like the following, we recommend you put it somewhere inside config/boot.rb, and you should be good to go:
  221
+
  222
+<pre lang=ruby><code>
  223
+Mail::Message.class_eval do
  224
+  include Padrino::Helpers::NumberHelpers
  225
+  include Padrino::Helpers::TranslationHelpers
  226
+end
  227
+</code></pre>

0 notes on commit 49fb4cf

Please sign in to comment.
Something went wrong with that request. Please try again.