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.3 app/models/caboose/discount.rb
caboose-cms-0.7.2 app/models/caboose/discount.rb
caboose-cms-0.7.1 app/models/caboose/discount.rb
caboose-cms-0.6.36 app/models/caboose/discount.rb
caboose-cms-0.6.35 app/models/caboose/discount.rb
caboose-cms-0.6.34 app/models/caboose/discount.rb
caboose-cms-0.6.33 app/models/caboose/discount.rb
caboose-cms-0.6.32 app/models/caboose/discount.rb
caboose-cms-0.6.31 app/models/caboose/discount.rb
caboose-cms-0.6.30 app/models/caboose/discount.rb
caboose-cms-0.6.29 app/models/caboose/discount.rb
caboose-cms-0.6.28 app/models/caboose/discount.rb
caboose-cms-0.6.27 app/models/caboose/discount.rb
caboose-cms-0.6.26 app/models/caboose/discount.rb
caboose-cms-0.6.25 app/models/caboose/discount.rb
caboose-cms-0.6.24 app/models/caboose/discount.rb
caboose-cms-0.6.23 app/models/caboose/discount.rb
caboose-cms-0.6.22 app/models/caboose/discount.rb
caboose-cms-0.6.21 app/models/caboose/discount.rb
caboose-cms-0.6.20 app/models/caboose/discount.rb