Skip to content

Instantly share code, notes, and snippets.

@cktricky
Created October 3, 2014 18:57
Show Gist options
  • Save cktricky/b7654d39c001afbfaff1 to your computer and use it in GitHub Desktop.
Save cktricky/b7654d39c001afbfaff1 to your computer and use it in GitHub Desktop.
devise mailer
if defined?(ActionMailer)
class Devise::Mailer < Devise.parent_mailer.constantize
include Devise::Mailers::Helpers
def confirmation_instructions(record, token, opts={})
@token = token
devise_mail(record, :confirmation_instructions, opts)
end
def reset_password_instructions(record, token, opts={})
@token = token
devise_mail(record, :reset_password_instructions, opts)
end
def unlock_instructions(record, token, opts={})
@token = token
devise_mail(record, :unlock_instructions, opts)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment