From 02f5a28f4093173eafb6e2e6b82feb7e04d94d1b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 26 Aug 2015 10:30:47 -0700 Subject: ask the response for the status The controller instance always has an instance of a response object. We should store the status code on the response object so that it's only store in one place. --- actionpack/lib/action_controller/metal.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 81d46aa466..4eff607782 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -153,7 +153,6 @@ module ActionController delegate :session, :headers, :to => "@_request" def initialize - @_status = 200 @_request = nil @_response = nil @_routes = nil @@ -194,12 +193,12 @@ module ActionController end def status - @_status + response.status end alias :response_code :status # :nodoc: def status=(status) - @_status = Rack::Utils.status_code(status) + response.status = Rack::Utils.status_code(status) end def response_body=(body) -- cgit v1.2.3