Sha256: e83927ab96695066613d252bcc642a8d939bbd6a0dbf30f74d869995a4cd9f23

Contents?: true

Size: 377 Bytes

Versions: 226

Compression:

Stored size: 377 Bytes

Contents

module Caboose
  class Discount < ActiveRecord::Base
    self.table_name  = 'store_order_discounts'
    self.primary_key = 'id'
            
    belongs_to :gift_card
    belongs_to :order
    attr_accessible :id,
      :gift_card_id,
      :order_id,
      :amount

    after_find do |d|
      d.amount = 0.00 if d.amount.nil?                        
    end
      
  end
end

Version data entries

226 entries across 226 versions & 1 rubygems

Version Path
caboose-cms-0.7.23 app/models/caboose/discount.rb
caboose-cms-0.7.22 app/models/caboose/discount.rb
caboose-cms-0.7.21 app/models/caboose/discount.rb
caboose-cms-0.7.20 app/models/caboose/discount.rb
caboose-cms-0.7.19 app/models/caboose/discount.rb
caboose-cms-0.7.18 app/models/caboose/discount.rb
caboose-cms-0.7.17 app/models/caboose/discount.rb
caboose-cms-0.7.16 app/models/caboose/discount.rb
caboose-cms-0.7.15 app/models/caboose/discount.rb
caboose-cms-0.7.14 app/models/caboose/discount.rb
caboose-cms-0.7.13 app/models/caboose/discount.rb
caboose-cms-0.7.12 app/models/caboose/discount.rb
caboose-cms-0.7.11 app/models/caboose/discount.rb
caboose-cms-0.7.10 app/models/caboose/discount.rb
caboose-cms-0.7.9 app/models/caboose/discount.rb
caboose-cms-0.7.8 app/models/caboose/discount.rb
caboose-cms-0.7.7 app/models/caboose/discount.rb
caboose-cms-0.7.6 app/models/caboose/discount.rb
caboose-cms-0.7.5 app/models/caboose/discount.rb
caboose-cms-0.7.4 app/models/caboose/discount.rb