Open lazywei opened 10 years ago
I found that #229 and #230 seems to be created for such use case.
I tried:
param :store do
...
param :apps_attributes, Array do
param :description
end
end
and in document:
store[apps_attributes]
Value: Must be an Array of nested elements
store[apps_attributes][description]
Value: Must be String
store[apps_attributes][description]
seems a little confusing. If I saw some docs like this, I may misunderstand it, and pass parameter likes ... {"apps_attributes": {"description: ... }} ...
, which is definitely wrong.
Yeah, We had first just a nested hash support, and added the arrays there later, but keeping the same way how we display the stuff. I'm not sure which would be the best solution to this …
Hi there,
In Rails, I can use
and then pass parameters to controller
How can I define params for such use case?
Must I define like this?
And, how to define
array
? The document for Array Validator seems not for such case.Thanks.