Skip to content

Instantly share code, notes, and snippets.

@phil-monroe
Created April 17, 2016 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phil-monroe/81b4338f8630b787ed0ea6a311c6294d to your computer and use it in GitHub Desktop.
Save phil-monroe/81b4338f8630b787ed0ea6a311c6294d to your computer and use it in GitHub Desktop.
Example of how to use mailer versioning in Lale.help
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