Skip to content

Commit

Permalink
Merge branch 'release/v0.8.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbulat committed Feb 14, 2014
2 parents 65bab08 + 807cc76 commit 788d3ba
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 15 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ test.sqlite3
spec/debug.log
.DS_Store
.yardoc/
pkg/
pkg/
.ruby-version
.rvmrc
.ruby-gemset
1 change: 0 additions & 1 deletion .rvmrc

This file was deleted.

2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
plutus (0.8.0)
plutus (0.8.1)
rails (~> 4.0)

GEM
Expand Down
8 changes: 4 additions & 4 deletions app/models/plutus/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ module Plutus
#
# @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
Expand Down
6 changes: 3 additions & 3 deletions app/models/plutus/amount.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ module Plutus
#
# @author Michael Bulat
class Amount < ActiveRecord::Base
belongs_to :transaction
belongs_to :account
belongs_to :transaction, :class_name => 'Plutus::Transaction'
belongs_to :account, :class_name => 'Plutus::Account'

validates_presence_of :type, :amount, :transaction, :account
end
end
end
8 changes: 4 additions & 4 deletions app/models/plutus/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ module Plutus
# @author Michael Bulat
class Transaction < ActiveRecord::Base
belongs_to :commercial_document, :polymorphic => true
has_many :credit_amounts, :extend => AmountsExtension
has_many :debit_amounts, :extend => AmountsExtension
has_many :credit_accounts, :through => :credit_amounts, :source => :account
has_many :debit_accounts, :through => :debit_amounts, :source => :account
has_many :credit_amounts, :extend => AmountsExtension, :class_name => 'Plutus::CreditAmount'
has_many :debit_amounts, :extend => AmountsExtension, :class_name => 'Plutus::DebitAmount'
has_many :credit_accounts, :through => :credit_amounts, :source => :account, :class_name => 'Plutus::Account'
has_many :debit_accounts, :through => :debit_amounts, :source => :account, :class_name => 'Plutus::Account'

validates_presence_of :description
validate :has_credit_amounts?
Expand Down
2 changes: 1 addition & 1 deletion lib/plutus/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Plutus
VERSION = "0.8.0"
VERSION = "0.8.1"
end

0 comments on commit 788d3ba

Please sign in to comment.