Class: Spree::UserMailer

Inherits:
BaseMailer
  • Object
show all
Defined in:
app/mailers/spree/user_mailer.rb

Instance Method Summary collapse

Instance Method Details

#confirmation_instructions(user, token, _opts = {}) ⇒ Object



9
10
11
12
13
14
# File 'app/mailers/spree/user_mailer.rb', line 9

def confirmation_instructions(user, token, _opts = {})
  @confirmation_url = spree.spree_user_confirmation_url(confirmation_token: token, host: Spree::Store.current.url)
  @email = user.email

  mail to: user.email, from: from_address, subject: Spree::Store.current.name + ' ' + I18n.t(:subject, scope: [:devise, :mailer, :confirmation_instructions])
end

#reset_password_instructions(user, token, *_args) ⇒ Object



3
4
5
6
7
# File 'app/mailers/spree/user_mailer.rb', line 3

def reset_password_instructions(user, token, *_args)
  @edit_password_reset_url = spree.edit_spree_user_password_url(reset_password_token: token, host: Spree::Store.current.url)

  mail to: user.email, from: from_address, subject: Spree::Store.current.name + ' ' + I18n.t(:subject, scope: [:devise, :mailer, :reset_password_instructions])
end