debitcredit 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/app/models/debitcredit/extension.rb +8 -3
- data/lib/debitcredit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df64b49793f6e14d759a23a7685e5a38e0dc87cf
|
4
|
+
data.tar.gz: 3f50cb6ed56a4952d7ca7405fa3ad339c62fd1ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1535f507354e1cf4118dfb47f6cd0da1b1a4114f5dbbf8921afb5c5ec439037a0764e0ebaaca4d4cd6b528dbbb5bae893ef051c39dddb1c58e1c163f458e9ec3
|
7
|
+
data.tar.gz: 8ab04eeda5d4f006031f70eac05e85efd24e28d07ea987b7b162211ecc7f652f988f2b9bc6ea870bfb0d379ee811f0b32eec82be5155f497644cb81a9f4583cd
|
data/README.md
CHANGED
@@ -14,12 +14,17 @@ module Debitcredit
|
|
14
14
|
def has_accounts(&block)
|
15
15
|
has_many :accounts, as: :reference, class_name: 'Debitcredit::Account', inverse_of: :reference do
|
16
16
|
extend ProxyMethods
|
17
|
-
instance_eval &block
|
17
|
+
instance_eval &block if block
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
def has_transactions
|
22
|
-
has_many :transactions, as: :reference, class_name: 'Debitcredit::Transaction'
|
21
|
+
def has_transactions(&block)
|
22
|
+
has_many :transactions, as: :reference, class_name: 'Debitcredit::Transaction' do
|
23
|
+
def [](kind)
|
24
|
+
find_by kind: kind
|
25
|
+
end
|
26
|
+
instance_eval &block if block
|
27
|
+
end
|
23
28
|
end
|
24
29
|
end
|
25
30
|
end
|
data/lib/debitcredit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debitcredit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vitaly Kushner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|