Class: SalesCampaign
- Defined in:
- app/models/sales_campaign.rb
Overview
An sales campaign
Carries an affiliate fee
Direct Known Subclasses
Instance Method Summary collapse
-
#cost ⇒ Object
The sum cost of this campaign.
- #set_cost(options = {}) ⇒ Object
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
#cost ⇒ Object
The sum cost of this campaign
14 15 16 |
# File 'app/models/sales_campaign.rb', line 14 def cost sales_fee end |
#set_cost(options = {}) ⇒ Object
18 19 20 21 |
# File 'app/models/sales_campaign.rb', line 18 def set_cost( = {}) dated_costs.clear dated_costs.create(.merge(:cost => cost)) end |