Sha256: 70e9c58bbe0ebe96e7a1740090e5e2f6cf3fda9ad9a6fd2959402b3c28936793

Contents?: true

Size: 905 Bytes

Versions: 7

Compression:

Stored size: 905 Bytes

Contents

module IshManager
  class ApplicationMailer < ActionMailer::Base
    default from: 'from@example.com'
    layout 'mailer'

    def welcome
      @var = :value
      mail( :to => 'piousbox@gmail.com', :subject => 'Abba, welcome!' ).deliver
    end

    def stock_alert stock
      @stock = stock
      mail( :to => stock.profile.email, :subject => 'IshManager Stock Alert' ).deliver
    end

    def shared_galleries profiles, gallery
      @gallery        = gallery
      @domain         = Rails.application.config.action_mailer.default_url_options[:host]
      @galleries_path = IshManager::Engine.routes.url_helpers.galleries_path
      @gallery_path   = IshManager::Engine.routes.url_helpers.gallery_path(@gallery)
      mail( :to => 'victor@wasya.co',
            :bcc => profiles.map { |p| p.email },
            :subject => 'You got new shared galleries on pi manager' ).deliver
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ish_manager-0.1.8.75 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.74 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.73 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.72 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.71 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.70 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.69 app/mailers/ish_manager/application_mailer.rb