Sha256: 0e18c0707aaa19f1813707157795d5e809832db3de63d0a5d01d60aa86eaabf9

Contents?: true

Size: 308 Bytes

Versions: 1

Compression:

Stored size: 308 Bytes

Contents

# An ad driven campaign.
#
# Unique from other campaigns in that their cost is derived from associated
# DatedCost records.
#
class AdvertisingCampaign < Campaign
  has_many :dated_costs, :as => :costable

  ##
  # The sum cost of this campaign
  #
  def cost
    Money.new(dated_costs.sum(:cost))
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
e9_crm-0.1.1 app/models/advertising_campaign.rb