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.5.136 app/models/caboose/discount.rb
caboose-cms-0.5.135 app/models/caboose/discount.rb
caboose-cms-0.5.134 app/models/caboose/discount.rb
caboose-cms-0.5.133 app/models/caboose/discount.rb
caboose-cms-0.5.132 app/models/caboose/discount.rb
caboose-cms-0.5.131 app/models/caboose/discount.rb