Sha256: 2b7846089b9a019a82548dc255ce94aa476b5f5cedd07cf138c50d82095f589b

Contents?: true

Size: 1.05 KB

Versions: 51

Compression:

Stored size: 1.05 KB

Contents

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

    def stock_alert stock
      @stock = stock
      mail( :to => stock.profile.email, :subject => "IshManager Stock Alert :: #{stock.ticker}" ).deliver
    end

    def condor_followup_alert args
      @condor = Ish::IronCondor.find args[:condor_id]
      @args = args
      mail( to: 'piousbox@gmail.com', subject: "Condor Followup Alert :: #{condor.ticker} #{args.to_s}" ).deliver
    end

    def shared_galleries profiles, gallery
      return if profiles.count == 0
      @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.galleryname)
      mail( :to => '314658@gmail.com',
            :bcc => profiles.map { |p| p.email },
            :subject => 'You got new shared galleries on pi manager' ).deliver
    end

  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
ish_manager-0.1.8.253 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.252 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.251 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.250 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.249 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.248 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.247 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.246 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.245 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.244 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.243 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.242 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.241 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.239 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.238 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.237 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.236 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.235 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.234 app/mailers/ish_manager/application_mailer.rb
ish_manager-0.1.8.233 app/mailers/ish_manager/application_mailer.rb