Class: UserMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/user_mailer.rb

Overview

Copyright © 2008-2013 Michael Dvorkin and contributors.

Fat Free CRM is freely distributable under the terms of MIT license. See MIT-LICENSE file or www.opensource.org/licenses/mit-license.php


Instance Method Summary collapse

Instance Method Details

#assigned_entity_notification(entity, assigner) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'app/mailers/user_mailer.rb', line 18

def assigned_entity_notification(entity, assigner)
  @entity_url = url_for(entity)
  @entity_name = entity.name
  @entity_type = entity.class.name
  @assigner_name = assigner.name
  mail subject: "Fat Free CRM: You have been assigned #{@entity_name} #{@entity_type}",
       to: entity.assignee.email,
       from: from_address
end

#password_reset_instructions(user) ⇒ Object



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

def password_reset_instructions(user)
  @edit_password_url = edit_password_url(user.perishable_token)

  mail subject: "Fat Free CRM: " + I18n.t(:password_reset_instruction),
       to: user.email,
       from: from_address,
       date: Time.now
end