debitcredit 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5c9ca7c15a9a0033ccdf7dc8ba48be7c2235f09
|
4
|
+
data.tar.gz: 639c675e7fa7448a3dae30abd464249af7dffafc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eabc70957e8da1b80fd373f3b9626af95a56b35f4c9245695c7558ea18d2b9318a1a8a7eb9c4c488573124d83cf32e6d3c4635be4354615a384128d2a98c818
|
7
|
+
data.tar.gz: 1fbde6b1603f9e3768d316636c249d78aa5795e39131164007a71270c32434d03a588c2216a0559321479cee70c5244ff459a0c686cfca2e4414f5facaa5e337
|
@@ -5,6 +5,8 @@ module Debitcredit
|
|
5
5
|
|
6
6
|
validates :name, :balance, presence: true
|
7
7
|
|
8
|
+
validates :balance, numericality: {greater_than_or_equal_to: 0}, unless: :overdraft_enabled?
|
9
|
+
|
8
10
|
scope :asset, ->{where(type: AssetAccount.name)}
|
9
11
|
scope :equity, ->{where(type: EquityAccount.name)}
|
10
12
|
scope :liability, ->{where(type: LiabilityAccount.name)}
|
data/lib/debitcredit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vitaly Kushner
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- db/migrate/20140121181326_create_debitcredit_items.rb
|
203
203
|
- db/migrate/20140128131859_add_transaction_parent.rb
|
204
204
|
- db/migrate/20140128134203_longer_account_name.rb
|
205
|
+
- db/migrate/20140128153104_add_account_overdraft.rb
|
205
206
|
- lib/debitcredit/engine.rb
|
206
207
|
- lib/debitcredit/version.rb
|
207
208
|
- lib/debitcredit.rb
|