Sha256: c7f5502c9f3ff19b1873ed094cd93a7fda36f0255f43ed30bd2e0ca544d4ab0e

Contents?: true

Size: 832 Bytes

Versions: 7

Compression:

Stored size: 832 Bytes

Contents

# frozen_string_literal: true

# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
class UserMailer < ActionMailer::Base
  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

  private

  def from_address
    Setting.dig(:smtp, :from).presence || "Fat Free CRM <noreply@fatfreecrm.com>"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fat_free_crm-0.22.1 app/mailers/user_mailer.rb
fat_free_crm-0.22.0 app/mailers/user_mailer.rb
fat_free_crm-0.21.0 app/mailers/user_mailer.rb
fat_free_crm-0.20.1 app/mailers/user_mailer.rb
fat_free_crm-0.20.0 app/mailers/user_mailer.rb
fat_free_crm-0.19.2 app/mailers/user_mailer.rb
fat_free_crm-0.19.0 app/mailers/user_mailer.rb