aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-26 10:30:47 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-26 10:51:13 -0700
commit02f5a28f4093173eafb6e2e6b82feb7e04d94d1b (patch)
tree0d2f926a4bc6a0720b48df326758621371ab30b7 /actionpack/lib
parent109fb8e7a94e2bebb1f7b628c2fd1b377f5601e2 (diff)
downloadrails-02f5a28f4093173eafb6e2e6b82feb7e04d94d1b.tar.gz
rails-02f5a28f4093173eafb6e2e6b82feb7e04d94d1b.tar.bz2
rails-02f5a28f4093173eafb6e2e6b82feb7e04d94d1b.zip
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.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal.rb5
1 files changed, 2 insertions, 3 deletions
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)