has_accounts 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/models/bank.rb +3 -1
- data/app/models/booking.rb +1 -1
- data/lib/has_accounts/model.rb +1 -1
- data/lib/has_accounts/version.rb +1 -1
- metadata +7 -8
data/app/models/bank.rb
CHANGED
data/app/models/booking.rb
CHANGED
@@ -172,7 +172,7 @@ class Booking < ActiveRecord::Base
|
|
172
172
|
end
|
173
173
|
|
174
174
|
# Reference
|
175
|
-
belongs_to :reference, :polymorphic => true, :touch => true
|
175
|
+
belongs_to :reference, :polymorphic => true, :touch => true, :inverse_of => :bookings
|
176
176
|
after_save :notify_references
|
177
177
|
after_destroy :notify_references
|
178
178
|
|
data/lib/has_accounts/model.rb
CHANGED
@@ -5,7 +5,7 @@ module HasAccounts
|
|
5
5
|
included do
|
6
6
|
class_attribute :direct_account
|
7
7
|
|
8
|
-
has_many :bookings, :as => :reference, :dependent => :destroy do
|
8
|
+
has_many :bookings, :as => :reference, :dependent => :destroy, :inverse_of => :reference do
|
9
9
|
# TODO: duplicated in Booking (without parameter)
|
10
10
|
def direct_balance(value_date = nil, direct_account = nil)
|
11
11
|
return BigDecimal.new('0') unless proxy_owner.direct_account
|
data/lib/has_accounts/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_accounts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 91
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 17
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.17.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Simon H\xC3\xBCrlimann (CyT)"
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-12-30 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: rails
|
@@ -103,7 +102,6 @@ files:
|
|
103
102
|
- lib/has_accounts/version.rb
|
104
103
|
- MIT-LICENSE
|
105
104
|
- README.md
|
106
|
-
has_rdoc: true
|
107
105
|
homepage: https://github.com/huerlisi/has_accounts
|
108
106
|
licenses:
|
109
107
|
- MIT
|
@@ -133,9 +131,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
131
|
requirements: []
|
134
132
|
|
135
133
|
rubyforge_project:
|
136
|
-
rubygems_version: 1.
|
134
|
+
rubygems_version: 1.8.10
|
137
135
|
signing_key:
|
138
136
|
specification_version: 3
|
139
137
|
summary: HasAccounts provides models for financial accounting.
|
140
138
|
test_files: []
|
141
139
|
|
140
|
+
has_rdoc:
|