Created
April 17, 2016 00:22
-
-
Save phil-monroe/81b4338f8630b787ed0ea6a311c6294d to your computer and use it in GitHub Desktop.
Example of how to use mailer versioning in Lale.help
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserMailer < BaseMandrillMailer | |
# Template in mandrill: ":lang/user/forgot_password/v2" | |
def forgot_password(user, token) | |
build_message(user.language, user.email, version: 2) do | |
# ^ note the named parameter "version" | |
# Merge Vars... | |
end | |
end | |
# Template in mandrill: ":lang/user/account_activation" | |
def account_activation(circle, user, token) | |
build_message(user.language, user.email) do | |
# Merge Vars... | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment