smart_params 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/smart_params/field.rb +2 -7
- data/lib/smart_params/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f216f02ebccbcfbe69692ca651d6b498a32e0aad5489214fe5080c25fd16049c
|
4
|
+
data.tar.gz: f378546a99befd976fe15792a44a596a2d46fca01df46cc908e5c0cea39ca0ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6eeb0425ba7a69364842c3c56d6d29a57f4711d6ef7af9c29a658df1998c7b35c5782ec18c1e0c656dd7faa09bb00d1e1cdf41efd8ecebf5f7c6f9cb00b9f9e4
|
7
|
+
data.tar.gz: b718ead8ded3f5d7bc6ff4ece9892051da9d580892b3087e2594c05211e1d0b92d84fd13ecaccb54aad5e7ff1b6417c44363f6823b6c5b5e10477995182acd14
|
data/README.md
CHANGED
data/lib/smart_params/field.rb
CHANGED
@@ -28,13 +28,8 @@ module SmartParams
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def to_hash
|
31
|
-
|
32
|
-
|
33
|
-
if chain.any?
|
34
|
-
tree.dig(*chain)[key] = value
|
35
|
-
else
|
36
|
-
tree[key] = value
|
37
|
-
end
|
31
|
+
keychain.reverse.reduce(value) do |accumulation, key|
|
32
|
+
{ key => accumulation }
|
38
33
|
end
|
39
34
|
end
|
40
35
|
|
data/lib/smart_params/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_params
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kurtis Rainbolt-Greene
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|