Closed ichilton closed 11 years ago
resource
method is alias for namespace
In grape:
def namespace(space = nil, &block)
# code
end
No we can not pass options argument to resource
method. But, but :)
You can do a trick
class MyApi < Grape::API
desc "my_desc", :rabl => "user"
resource "user" do
get("/") # == get("/", :rabl => "user")
end
But for you information, this issue is related to grape
It would be good if you could supply the :rabl option to a resource.
For example, instead of:
You could do:
Thanks,
Ian