Sha256: d122eeab73104eb584548a7ab41d5fbc34d76451d371a7ac7b03c4d55ded9be7

Contents?: true

Size: 493 Bytes

Versions: 15

Compression:

Stored size: 493 Bytes

Contents

class Donation < ActiveRecord::Base
  include Itemable
  belongs_to :cart
  belongs_to :organization

  validates_numericality_of :amount, :greater_than => 0
  validates_presence_of :organization

  def price
    amount
  end
  alias_method :cart_price, :price

  def self.realized_fee
    0
  end

  def order_summary_description
    "Donation"
  end

  def expired?
    false
  end

  def refundable?
    true
  end

  def exchangeable?
    false
  end

  def returnable?
    false
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
artfully_ose-1.2.0.pre.16 app/models/donation.rb
artfully_ose-1.2.0.pre.15 app/models/donation.rb
artfully_ose-1.2.0.pre.12 app/models/donation.rb
artfully_ose-1.2.0.pre.11 app/models/donation.rb
artfully_ose-1.2.0.pre.10 app/models/donation.rb
artfully_ose-1.2.0.pre.9 app/models/donation.rb
artfully_ose-1.2.0.pre.8 app/models/donation.rb
artfully_ose-1.2.0.pre.7 app/models/donation.rb
artfully_ose-1.2.0.pre.6 app/models/donation.rb
artfully_ose-1.2.0.pre.5 app/models/donation.rb
artfully_ose-1.2.0.pre.4 app/models/donation.rb
artfully_ose-1.2.0.pre.3 app/models/donation.rb
artfully_ose-1.2.0.pre.2 app/models/donation.rb
artfully_ose-1.2.0.pre.1 app/models/donation.rb
artfully_ose-1.2.0.pre app/models/donation.rb