Sha256: 4ddc7f04e45decfb63a40f8019d059792f6910a5bc12f550f2808be2973eafc9
Contents?: true
Size: 444 Bytes
Versions: 16
Compression:
Stored size: 444 Bytes
Contents
# An sales campaign # # Carries an affiliate fee # class SalesCampaign < Campaign money_columns :sales_fee belongs_to :sales_person, :class_name => 'Contact' validates :sales_person, :presence => { :if => lambda {|x| x.type == 'SalesCampaign' } } ## # The sum cost of this campaign # def cost sales_fee end def set_cost(options = {}) dated_costs.clear dated_costs.create(options.merge(:cost => cost)) end end
Version data entries
16 entries across 16 versions & 1 rubygems