Class: Smailer::Models::QueuedMail
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Smailer::Models::QueuedMail
- Defined in:
- lib/smailer/models/queued_mail.rb
Instance Method Summary collapse
- #add_attachment(filename, path) ⇒ Object
- #attachments ⇒ Object
- #body_html ⇒ Object
- #body_text ⇒ Object
- #key ⇒ Object
- #mail_campaign=(campaign) ⇒ Object
- #mail_campaign_id=(campaign_id) ⇒ Object
Instance Method Details
#add_attachment(filename, path) ⇒ Object
48 49 50 |
# File 'lib/smailer/models/queued_mail.rb', line 48 def (filename, path) my_mail_template..build(:filename => filename, :path => path) end |
#attachments ⇒ Object
44 45 46 |
# File 'lib/smailer/models/queued_mail.rb', line 44 def active_mail_template. end |
#body_html ⇒ Object
31 32 33 |
# File 'lib/smailer/models/queued_mail.rb', line 31 def body_html interpolate active_mail_template.body_html end |
#body_text ⇒ Object
35 36 37 |
# File 'lib/smailer/models/queued_mail.rb', line 35 def body_text interpolate active_mail_template.body_text end |
#key ⇒ Object
39 40 41 42 |
# File 'lib/smailer/models/queued_mail.rb', line 39 def key self[:key] end |
#mail_campaign=(campaign) ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/smailer/models/queued_mail.rb', line 60 def mail_campaign=(campaign) write_attribute(:mail_campaign_id, campaign.try(:id)) fill_from_campaign_template mail_campaign end |
#mail_campaign_id=(campaign_id) ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/smailer/models/queued_mail.rb', line 52 def mail_campaign_id=(campaign_id) write_attribute(:mail_campaign_id, campaign_id) fill_from_campaign_template mail_campaign_id end |