Sha256: 7a7872d025c55d1f21f6e86fdb7c33e3e0beed443cc3c888c9d6ac409a4a61d0

Contents?: true

Size: 355 Bytes

Versions: 13

Compression:

Stored size: 355 Bytes

Contents

module E9Crm
  module Email
    extend ActiveSupport::Concern

    included do
      attr_accessor :contact

      def locals_with_contact
        default_locals.merge({
          :contact => @contact || recipient.try(:contact)
        })
      end

      alias :default_locals :this_locals
      alias :this_locals :locals_with_contact
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
e9_crm-0.1.26 lib/e9_crm/email.rb
e9_crm-0.1.25 lib/e9_crm/email.rb
e9_crm-0.1.24 lib/e9_crm/email.rb
e9_crm-0.1.23 lib/e9_crm/email.rb
e9_crm-0.1.22 lib/e9_crm/email.rb
e9_crm-0.1.21 lib/e9_crm/email.rb
e9_crm-0.1.20 lib/e9_crm/email.rb
e9_crm-0.1.19 lib/e9_crm/email.rb
e9_crm-0.1.18 lib/e9_crm/email.rb
e9_crm-0.1.17 lib/e9_crm/email.rb
e9_crm-0.1.16 lib/e9_crm/email.rb
e9_crm-0.1.14 lib/e9_crm/email.rb
e9_crm-0.1.13 lib/e9_crm/email.rb