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.85 app/models/caboose/discount.rb
caboose-cms-0.7.84 app/models/caboose/discount.rb
caboose-cms-0.7.83 app/models/caboose/discount.rb
caboose-cms-0.7.82 app/models/caboose/discount.rb
caboose-cms-0.7.81 app/models/caboose/discount.rb
caboose-cms-0.7.80 app/models/caboose/discount.rb
caboose-cms-0.7.79 app/models/caboose/discount.rb
caboose-cms-0.7.78 app/models/caboose/discount.rb
caboose-cms-0.7.77 app/models/caboose/discount.rb
caboose-cms-0.7.76 app/models/caboose/discount.rb
caboose-cms-0.7.75 app/models/caboose/discount.rb
caboose-cms-0.7.74 app/models/caboose/discount.rb
caboose-cms-0.7.73 app/models/caboose/discount.rb
caboose-cms-0.7.72 app/models/caboose/discount.rb
caboose-cms-0.7.71 app/models/caboose/discount.rb
caboose-cms-0.7.70 app/models/caboose/discount.rb
caboose-cms-0.7.69 app/models/caboose/discount.rb
caboose-cms-0.7.68 app/models/caboose/discount.rb
caboose-cms-0.7.67 app/models/caboose/discount.rb
caboose-cms-0.7.66 app/models/caboose/discount.rb