Class: Ish::EmailCampaign
- Inherits:
-
Object
- Object
- Ish::EmailCampaign
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/ish/email_campaign.rb
Overview
Sends a campaign. vp 2023-02-02
Constant Summary collapse
- PAGE_PARAM_NAME =
'email_contexts_page'
- FROM_EMAILS =
%w| [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] |
Instance Attribute Summary collapse
-
#tid ⇒ Object
readonly
For tracking.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#tid ⇒ Object (readonly)
For tracking
63 64 65 |
# File 'lib/ish/email_campaign.rb', line 63 def tid @tid end |
Class Method Details
.from_email_list ⇒ Object
23 24 25 |
# File 'lib/ish/email_campaign.rb', line 23 def self.from_email_list [ [nil, nil] ] + FROM_EMAILS.map { |i| [i, i] } end |
Instance Method Details
#campaign_leads ⇒ Object
38 39 40 |
# File 'lib/ish/email_campaign.rb', line 38 def campaign_leads return ::EmailCampaignLead.where( email_campaign_id: self.id.to_s ).includes( :lead ) end |
#leads ⇒ Object
42 43 44 |
# File 'lib/ish/email_campaign.rb', line 42 def leads campaign_leads&.map { |p| p.lead } end |
#slug ⇒ Object
12 13 14 |
# File 'lib/ish/email_campaign.rb', line 12 def slug title end |