We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 079b2aa commit 197e017Copy full SHA for 197e017
lib/grape.rb
@@ -11,6 +11,7 @@
11
require 'active_support/core_ext/hash/indifferent_access'
12
require 'active_support/core_ext/object/blank'
13
require 'active_support/core_ext/array/extract_options'
14
+require 'active_support/core_ext/array/wrap'
15
require 'active_support/core_ext/hash/deep_merge'
16
require 'active_support/core_ext/hash/except'
17
require 'active_support/dependencies/autoload'
lib/grape/validations/attributes_iterator.rb
@@ -5,8 +5,7 @@ class AttributesIterator
5
6
def initialize(validator, scope, params)
7
@attrs = validator.attrs
8
- @params = scope.params(params)
9
- @params = (@params.is_a?(Array) ? @params : [@params])
+ @params = Array.wrap(scope.params(params))
10
end
def each
0 commit comments