app/models/plutus/account.rb in plutus-0.8.0 vs app/models/plutus/account.rb in plutus-0.8.1

- old
+ new

@@ -28,13 +28,13 @@ # @see http://en.wikipedia.org/wiki/Accounting_equation Accounting Equation # @see http://en.wikipedia.org/wiki/Debits_and_credits Debits, Credits, and Contra Accounts # # @author Michael Bulat class Account < ActiveRecord::Base - has_many :credit_amounts, :extend => AmountsExtension - has_many :debit_amounts, :extend => AmountsExtension - has_many :credit_transactions, :through => :credit_amounts, :source => :transaction - has_many :debit_transactions, :through => :debit_amounts, :source => :transaction + has_many :credit_amounts, :extend => AmountsExtension, :class_name => 'Plutus::CreditAmount' + has_many :debit_amounts, :extend => AmountsExtension, :class_name => 'Plutus::DebitAmount' + has_many :credit_transactions, :through => :credit_amounts, :source => :transaction, :class_name => 'Plutus::Transaction' + has_many :debit_transactions, :through => :debit_amounts, :source => :transaction, :class_name => 'Plutus::Transaction' validates_presence_of :type, :name validates_uniqueness_of :name # The credit balance for the account.