objection 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/objection.rb +2 -2
- data/lib/objection/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: 68aea8decfb30224900fac9ec3a1a5f7df5543d8
|
4
|
+
data.tar.gz: 609bd5772c17b306e8c271bc800c41763f32276c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edcf23c9ddb40141b53a050e86a372ea9f0368978420d9ed864c2b8c80f60ed8bf92fe2bdde1fa2e0dc7183f5576e94f54495b986d5c51a9005f3636dbd73a75
|
7
|
+
data.tar.gz: d66141ff3ebac2d2ec540f77bdb9cf0457881459d10a83785fec8b065c852892c40596b67f27be01b7b252e26bcdb990ad94fe1ed65fe3a7b74d88bf75ff3023
|
data/lib/objection.rb
CHANGED
@@ -64,7 +64,7 @@ module Objection
|
|
64
64
|
def apply_structures!
|
65
65
|
input_types.each do |field, type|
|
66
66
|
value = self.send(field)
|
67
|
-
if !value.is_a?(type) && value.is_a?(Hash)
|
67
|
+
if !value.is_a?(type) && ( value.is_a?(Hash) || value.class.to_s == 'ActionController::Parameters' )
|
68
68
|
@values[field] = type.new(value)
|
69
69
|
end
|
70
70
|
if !value.is_a?(type) && value.is_a?(Array)
|
@@ -110,7 +110,7 @@ module Objection
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def normalize_input(*args)
|
113
|
-
if args.any? && args[0].is_a?(Hash)
|
113
|
+
if args.any? && ( args[0].is_a?(Hash) || args[0].class.to_s == 'ActionController::Parameters' )
|
114
114
|
args[0].inject({}) do |out, (key, value)|
|
115
115
|
out.merge(key.to_sym => value)
|
116
116
|
end
|
data/lib/objection/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: objection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ewout Quax
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|