Class: IshManager::ApplicationMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- IshManager::ApplicationMailer
show all
- Defined in:
- app/mailers/ish_manager/application_mailer.rb
Instance Method Summary
collapse
Instance Method Details
#option_alert(option) ⇒ Object
20
21
22
23
24
25
26
|
# File 'app/mailers/ish_manager/application_mailer.rb', line 20
def option_alert option
@option = option
mail({
:to => option.profile.email,
:subject => "IshManager Option Alert :: #{option.ticker}",
})
end
|
#shared_galleries(profiles, gallery) ⇒ Object
9
10
11
12
13
14
15
16
17
18
|
# File 'app/mailers/ish_manager/application_mailer.rb', line 9
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.slug)
mail( :to => '[email protected]',
:bcc => profiles.map { |p| p.email },
:subject => 'You got new shared galleries on pi manager' )
end
|
#stock_alert(watch_id) ⇒ Object
28
29
30
31
32
33
34
|
# File 'app/mailers/ish_manager/application_mailer.rb', line 28
def stock_alert watch_id
@watch = Iro::OptionWatch.find watch_id
mail({
to: @watch.profile.email,
subject: "Iro Watch Alert :: #{@watch.ticker} is #{@watch.direction} #{@watch.mark}."
})
end
|
#test_email ⇒ Object
36
37
38
|
# File 'app/mailers/ish_manager/application_mailer.rb', line 36
def test_email
mail( to: DEFAULT_RECIPIENT, subject: "Test email at #{Time.now}" )
end
|