active_tools 0.0.33 → 0.0.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_tools/active_model/valid_with.rb +2 -1
- data/lib/active_tools/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61ac99dabcb4e537d397d077f57a9f1e90303e5d
|
4
|
+
data.tar.gz: 08399e6f9aae134f98347560bf4c1ff9c13719e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7002e7e85eaa2705db0dbb74f161bbf84111cf40fa755e33b7e439e3500caa2ce6656c2884d280800746a106e326df205d681760a27dd96335f897f6b8a443e1
|
7
|
+
data.tar.gz: f81067f711edc309b958bd0e08df0e0fa623762cdcc0b416e4c5af61e6249bb2d2213d357fa1b1557f6107e3a7128af8c01e55faf582dab1e634c269e12dec8a
|
@@ -10,6 +10,7 @@ module ActiveTools
|
|
10
10
|
object_name = args.first
|
11
11
|
passed_attr_map = options.delete(:attributes)||{}
|
12
12
|
prefix = options.delete(:prefix)
|
13
|
+
fit = options.delete(:fit)||false
|
13
14
|
attr_map_name = :"_valid_with_#{object_name}"
|
14
15
|
unless respond_to?(attr_map_name)
|
15
16
|
class_attribute attr_map_name
|
@@ -20,7 +21,7 @@ module ActiveTools
|
|
20
21
|
|
21
22
|
validate(*[options]) do
|
22
23
|
if object = send(object_name)
|
23
|
-
if
|
24
|
+
if fit
|
24
25
|
object.instance_variable_set(:@errors, ActiveTools::ActiveModel::ValidWith::FakeErrors.new(object))
|
25
26
|
end
|
26
27
|
if !object.valid?
|
data/lib/active_tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valery Kvon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project: active_tools
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.5.1
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: ActionDispatch, ActionController, ActiveModel, ActiveRecord, ActiveSupport,
|