Read default serializer options from the controller

This commit is contained in:
Andrew Korzhuev 2014-10-12 21:30:48 +07:00
parent 85b92a4856
commit 704838ef5f

View file

@ -56,7 +56,7 @@ module Grape
end
def build_options_from_endpoint(endpoint)
endpoint.namespace_options.merge(endpoint.route_options)
[endpoint.default_serializer_options || {}, endpoint.namespace_options, endpoint.route_options].reduce(:merge)
end
# array root is the innermost namespace name ('space') if there is one,