Class: CampaignAction

Inherits:
ApplicationRecord show all
Includes:
Models::Auditable
Defined in:
app/models/campaign_action.rb

Overview

== Schema Information

Table name: campaign_actions
Database name: primary

id :integer not null, primary key
description :text
frequency :integer
last_transmitted :datetime
name :string
scheduled_time :datetime
sender_email :string
sequence :integer
state :string
type :string
created_at :datetime not null
updated_at :datetime not null
campaign_id :integer
creator_id :integer
email_template_id :integer
sender_id :integer
source_id :integer
updater_id :integer

Indexes

campaign_actions_campaign_id_idx (campaign_id)
campaign_actions_email_template_id_idx (email_template_id)
idx_type (type)

Foreign Keys

fk_rails_... (campaign_id => campaigns.id)
fk_rails_... (email_template_id => email_templates.id)

Direct Known Subclasses

CampaignEmail

Constant Summary

Constants included from Models::Auditable

Models::Auditable::ALWAYS_IGNORED

Instance Attribute Summary collapse

Belongs to collapse

Methods included from Models::Auditable

#creator, #updater

Methods included from Models::Auditable

#all_skipped_columns, #audit_reference_data, #should_not_save_version, #stamp_record

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Instance Attribute Details

#nameObject (readonly)



41
# File 'app/models/campaign_action.rb', line 41

validates :campaign, :name, presence: true

Instance Method Details

#campaignCampaign

Returns:

See Also:

Validations:



39
# File 'app/models/campaign_action.rb', line 39

belongs_to :campaign, optional: true