lib/flipper/api/action.rb in flipper-api-1.1.2 vs lib/flipper/api/action.rb in flipper-api-1.2.0

- old
+ new

@@ -67,11 +67,11 @@ def initialize(flipper, request) @flipper = flipper @request = request @code = 200 - @headers = { 'content-type' => Api::CONTENT_TYPE } + @headers = {Rack::CONTENT_TYPE => Api::CONTENT_TYPE} end # Public: Runs the request method for the provided request. # # Returns whatever the request method returns in the action. @@ -112,10 +112,10 @@ # # object - json serializable object # status - http status code def json_response(object, status = 200) - header 'content-type', Api::CONTENT_TYPE + header Rack::CONTENT_TYPE, Api::CONTENT_TYPE status(status) body = Typecast.to_json(object) halt [@code, @headers, [body]] end