lib/grape/middleware/base.rb in grape-0.12.0 vs lib/grape/middleware/base.rb in grape-0.13.0
- old
+ new
@@ -35,9 +35,10 @@
# @return [Response, nil] a Rack SPEC response or nil to call the application afterwards.
def after
end
def response
+ return @app_response if @app_response.is_a?(Rack::Response)
Rack::Response.new(@app_response[2], @app_response[0], @app_response[1])
end
def content_type_for(format)
HashWithIndifferentAccess.new(content_types)[format]