2
我限定PARAMS用于葡萄路线这样与阵列葡萄路线作为根对象
params do
requires :array, type: Array do
requires :foo, type: String
requires :bar, type: String
end
end
此端点的数据将是{"array": [{"foo": "123", "bar": "456"}]}
。
我该如何摆脱额外的
"array"
?该数据应该是这样的[{"foo": "123", "bar": "456"}]
我不能params
定义类型Array
。
我想大多数DSL的跳跃,因为漏洞的这个(如这里讨论:http://stackoverflow.com/q/395592/3109182) – Anthony
好了,这是有道理的!谢谢! – 23tux