Class: AdvertisingCampaign

Inherits:
Campaign
  • Object
show all
Defined in:
app/models/advertising_campaign.rb

Overview

An ad driven campaign.

Unique from other campaigns in that their cost is derived from associated DatedCost records.

Instance Method Summary collapse

Methods inherited from Campaign

default, #new_visit_count, #new_visit_page_view_count, #repeat_visit_count, #repeat_visit_page_view_count, #to_liquid, #to_s

Instance Method Details

#costObject

The sum cost of this campaign



13
14
15
# File 'app/models/advertising_campaign.rb', line 13

def cost
  Money.new(dated_costs.sum(:cost))
end