lib/grape/dsl/inside_route.rb in grape-1.7.0 vs lib/grape/dsl/inside_route.rb in grape-1.7.1
- old
+ new
@@ -93,10 +93,10 @@
def handle_passed_param(params_nested_path, has_passed_children = false, &_block)
return yield if has_passed_children
key = params_nested_path[0]
- key += "[#{params_nested_path[1..-1].join('][')}]" if params_nested_path.size > 1
+ key += "[#{params_nested_path[1..].join('][')}]" if params_nested_path.size > 1
route_options_params = options[:route_options][:params] || {}
type = route_options_params.dig(key, :type)
has_children = route_options_params.keys.any? { |k| k != key && k.start_with?(key) }