Parameter dependecy using given
does not work with nested arrays and custom block
#1602
Labels
given
does not work with nested arrays and custom block
#1602
What's happening
Given I declared some rules to be dependent on other param using
given parameter: -> v { v }
and I did it inside a nested array param, it raises error.Expected behavior
It should apply the rules.
Extended Explanation
Given this params:
When I call the controller with this params:
It fails with:
This is the source from grape where it fails:
I have put a
binding.pry
here on the source to see what's happening.The validations are being run over the entire array instead of over each element of it. It basically runs
[{"_destroy"=>true}][:_destroy]
which raises theTypeError (no implicit conversion of Symbol into Integer)
error.The text was updated successfully, but these errors were encountered: