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
18
19
20
21
22
23
24
|
# File 'app/mailers/ish_manager/application_mailer.rb', line 18
def option_alert option
@option = option
mail({
:to => option.profile.email,
:subject => "IshManager Option Alert :: #{option.ticker}",
})
end
|
#shared_galleries(profiles, gallery) ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'app/mailers/ish_manager/application_mailer.rb', line 7
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
26
27
28
29
30
31
32
|
# File 'app/mailers/ish_manager/application_mailer.rb', line 26
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
34
35
36
|
# File 'app/mailers/ish_manager/application_mailer.rb', line 34
def test_email
mail( to: DEFAULT_RECIPIENT, subject: "Test email at #{Time.now}" )
end
|