Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 28th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Devise and localized own mail template
  2. class LocalizedDeviseMailer < Devise::Mailer
  3.   def confirmation_instructions(record, locale)
  4.     @locale = locale
  5.     super
  6.   end
  7. end
  8.        
  9. I18n.locale = @locale
  10.        
  11. t("it.really.works")
  12.        
  13. # Setup a subject doing an I18n lookup. At first, it attemps to set a subject
  14.   # based on the current mapping:
  15.   #
  16.   #   en:
  17.   #     devise:
  18.   #       mailer:
  19.   #         confirmation_instructions:
  20.   #           user_subject: '...'
  21.   #