Sha256: 4c79f3c0e6c672f70b005573766e3bb927bea8530ae87dc291e464de6769a33c

Contents?: true

Size: 353 Bytes

Versions: 3

Compression:

Stored size: 353 Bytes

Contents

class Transaction < ActiveRecord::Base

  attr_accessible :amount_cents, :currency, :tax_cents, :amount, :tax

  monetize :amount_cents, :with_model_currency => :currency
  monetize :tax_cents, :with_model_currency => :currency

  monetize :total_cents, :with_model_currency => :currency
  def total_cents
    return amount_cents + tax_cents
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
money-rails-0.11.0 spec/dummy/app/models/transaction.rb
money-rails-0.10.0 spec/dummy/app/models/transaction.rb
money-rails-0.9.0 spec/dummy/app/models/transaction.rb