app/models/campaign.rb in e9_crm-0.1.18 vs app/models/campaign.rb in e9_crm-0.1.19
- old
+ new
@@ -6,16 +6,16 @@
class Campaign < ActiveRecord::Base
include E9Rails::ActiveRecord::STI
belongs_to :campaign_group
- has_many :deals, :inverse_of => :campaign, :dependent => :nullify
- has_many :won_deals, :class_name => 'Deal', :conditions => ['deals.status = ?', Deal::Status::Won]
- has_many :lost_deals, :class_name => 'Deal', :conditions => ['deals.status = ?', Deal::Status::Lost]
- has_many :pending_deals, :class_name => 'Deal', :conditions => ['deals.status = ?', Deal::Status::Pending]
- has_many :leads, :class_name => 'Deal', :conditions => ['deals.status = ?', Deal::Status::Lead]
- has_many :non_leads, :class_name => 'Deal', :conditions => ['deals.status != ?', Deal::Status::Lead]
- has_many :page_views, :inverse_of => :campaign, :dependent => :nullify
+ has_many :deals, :inverse_of => :campaign, :dependent => :nullify
+ has_many :won_deals, :class_name => 'Deal', :conditions => ['deals.status = ?', Deal::Status::Won]
+ has_many :lost_deals, :class_name => 'Deal', :conditions => ['deals.status = ?', Deal::Status::Lost]
+ has_many :pending_deals, :class_name => 'Deal', :conditions => ['deals.status = ?', Deal::Status::Pending]
+ has_many :leads, :class_name => 'Deal', :conditions => ['deals.status = ?', Deal::Status::Lead]
+ has_many :non_leads, :class_name => 'Deal', :conditions => ['deals.status != ?', Deal::Status::Lead]
+ has_many :page_views, :inverse_of => :campaign, :dependent => :nullify
# only advertising campaigns use this association
has_many :dated_costs, :as => :costable
# NOTE tracking cookie code changes with new visits