active_tools 0.0.42 → 0.0.50
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: 2fed305b8948e972bfa8d49c0d9bcbb10719c249
|
4
|
+
data.tar.gz: 2af83ee21be57d34ec36368ce65a00ec331d4ca6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae3f3d27967889287e0b28102b6d1154d3480c7deff13d426151923416abc56ca3bb4e9a06347ee1a6e679747aaae809a310000d3aeb39312a291333c1ee6f45
|
7
|
+
data.tar.gz: 2dc855f78c179f89914d581997f92f65708279b373eab60e77cff7cf126a72d72e7f2dfaa71f048f00ac221ddc8d97086962a9da36daa8e6aa59b4e38ad0f9ab
|
@@ -50,9 +50,10 @@ module ActiveTools
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def try_nullify
|
53
|
-
if
|
53
|
+
if nullify_target?
|
54
54
|
store_backup!
|
55
55
|
self.target = nil
|
56
|
+
true
|
56
57
|
end
|
57
58
|
end
|
58
59
|
|
@@ -158,7 +159,7 @@ module ActiveTools
|
|
158
159
|
klass.includes(outer_values).where(where_values).limit(1).first
|
159
160
|
end
|
160
161
|
|
161
|
-
def
|
162
|
+
def nullify_target?
|
162
163
|
target.present? && @nullify_if.try(:call, (target.persisted? ? target.reload : target), owner)
|
163
164
|
end
|
164
165
|
|
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.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valery Kvon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|