From 07ad64ab05708dc9e7c8682bfb761c61b612aef8 Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Tue, 4 Feb 2014 15:45:23 +0000 Subject: [PATCH 1/3] ignore rbenv and rmv files --- .gitignore | 5 ++++- .rvmrc | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 .rvmrc diff --git a/.gitignore b/.gitignore index f2776273..68d9d119 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ test.sqlite3 spec/debug.log .DS_Store .yardoc/ -pkg/ \ No newline at end of file +pkg/ +.ruby-version +.rvmrc +.ruby-gemset diff --git a/.rvmrc b/.rvmrc deleted file mode 100644 index ee176e35..00000000 --- a/.rvmrc +++ /dev/null @@ -1 +0,0 @@ -rvm 1.9.2@plutus --create From ac478248f70734ae358ed4da95806cd4714122b1 Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Fri, 14 Feb 2014 17:55:56 +0000 Subject: [PATCH 2/3] adding namespaced class_name on associations --- app/models/plutus/account.rb | 8 ++++---- app/models/plutus/amount.rb | 6 +++--- app/models/plutus/transaction.rb | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/models/plutus/account.rb b/app/models/plutus/account.rb index 9a8fceef..ecfdb376 100644 --- a/app/models/plutus/account.rb +++ b/app/models/plutus/account.rb @@ -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 diff --git a/app/models/plutus/amount.rb b/app/models/plutus/amount.rb index bb9193a0..5ccf917a 100644 --- a/app/models/plutus/amount.rb +++ b/app/models/plutus/amount.rb @@ -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 \ No newline at end of file +end diff --git a/app/models/plutus/transaction.rb b/app/models/plutus/transaction.rb index 2f4fc385..181f07d5 100644 --- a/app/models/plutus/transaction.rb +++ b/app/models/plutus/transaction.rb @@ -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? From 807cc76c01bf8edb8f6e5153658284fcede71376 Mon Sep 17 00:00:00 2001 From: Michael Bulat Date: Fri, 14 Feb 2014 17:57:31 +0000 Subject: [PATCH 3/3] bumping version --- Gemfile.lock | 2 +- lib/plutus/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e788e5ee..7f5550e8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - plutus (0.8.0) + plutus (0.8.1) rails (~> 4.0) GEM diff --git a/lib/plutus/version.rb b/lib/plutus/version.rb index c1356dd0..a0a414fc 100644 --- a/lib/plutus/version.rb +++ b/lib/plutus/version.rb @@ -1,3 +1,3 @@ module Plutus - VERSION = "0.8.0" + VERSION = "0.8.1" end