Class: Moist::CampaignSubscriber
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Moist::CampaignSubscriber
- Includes:
- Models::CampaignSubscriber
- Defined in:
- app/models/moist/campaign_subscriber.rb
Instance Method Summary collapse
Methods included from Models::CampaignSubscriber
#current_step, included, #mail!, #next_mailing, #next_step, #next_step?, #ready_for_next_mailing?
Instance Method Details
#create_mailings! ⇒ Object
17 18 19 20 21 |
# File 'app/models/moist/campaign_subscriber.rb', line 17 def create_mailings! moist_campaign.steps.each do |step| ::Moist::Mailing.create!(moist_campaign_subscriber: self, send_at: step.[:delay].from_now, mailer_class: step.mailer_class, mailer_action: step.mailer_action) end end |