params_deserializers 1.1.0 → 1.1.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8449c6713fa074a6819f6195ca7052e38b6ce3c
|
4
|
+
data.tar.gz: 5b8575be8be186c45c5eb11e23061c3ac77f656e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ff02cb39433535dbd21a7a3da3b7511727ca8452df5397661b082df70c506eaeecb9a6ce78d0cf7f192c85c29a20d62e0d8974c6901a5dc9499f42cd4a4b869
|
7
|
+
data.tar.gz: 6ece5c6ae77cd31315e66610630332afc5129c0e218fc9bd200bf678bebafdb78c9818d397914bc65b6c2b67edeeca37f27f240a45c007e273d577b6a5562e50
|
@@ -89,7 +89,7 @@ class ParamsDeserializer
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def verify_valid_keys
|
92
|
-
invalid_params = params_root.keys
|
92
|
+
invalid_params = params_root.keys.reject {|key| self.class.attrs.map(&:original_name).include?(key) }
|
93
93
|
if self.class.strict_mode && !invalid_params.blank?
|
94
94
|
raise InvalidKeyError, "Invalid keys in params: #{invalid_params.map(&:inspect).join(",")}."
|
95
95
|
end
|
@@ -116,8 +116,10 @@ class ParamsDeserializer
|
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
|
-
def ignore(
|
120
|
-
|
119
|
+
def ignore(*param_names)
|
120
|
+
param_names.each do |param_name|
|
121
|
+
attrs << Attribute.new(param_name, ignored: true)
|
122
|
+
end
|
121
123
|
end
|
122
124
|
|
123
125
|
def attributes(*args)
|