diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-12-22 16:08:03 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-12-22 16:08:03 -0600 |
commit | a1bf2f96ce6f086de8519e344ee7e396ae3da9bb (patch) | |
tree | 3c3a300bb56ec47dca0bc2b2d0379b33e295524e /actionpack/lib/action_controller | |
parent | 17b6053083767e5747c0f522b83a69e268d9d69e (diff) | |
download | rails-a1bf2f96ce6f086de8519e344ee7e396ae3da9bb.tar.gz rails-a1bf2f96ce6f086de8519e344ee7e396ae3da9bb.tar.bz2 rails-a1bf2f96ce6f086de8519e344ee7e396ae3da9bb.zip |
AD::StatusCodes support is now part of rack
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/base.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/redirecting.rb | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index f75b6ed641..dbba69f637 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -90,7 +90,7 @@ module ActionController end if options[:status] - options[:status] = ActionDispatch::StatusCodes[options[:status]] + options[:status] = Rack::Utils.status_code(options[:status]) end options[:update] = blk if block_given? diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 93a19f8f93..b436de9878 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -69,7 +69,7 @@ module ActionController end def status=(status) - @_status = ActionDispatch::StatusCodes[status] + @_status = Rack::Utils.status_code(status) end # :api: private diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb index 39dc23024c..7a2f9a6fc5 100644 --- a/actionpack/lib/action_controller/metal/redirecting.rb +++ b/actionpack/lib/action_controller/metal/redirecting.rb @@ -58,18 +58,18 @@ module ActionController logger.info("Redirected to #{location}") if logger && logger.info? end - + private def _extract_redirect_to_status(options, response_status) status = if options.is_a?(Hash) && options.key?(:status) - ActionDispatch::StatusCodes[options.delete(:status)] + Rack::Utils.status_code(options.delete(:status)) elsif response_status.key?(:status) - ActionDispatch::StatusCodes[response_status[:status]] + Rack::Utils.status_code(response_status[:status]) else 302 end end - + def _compute_redirect_to_location(options) case options # The scheme name consist of a letter followed by any combination of |