diff options
author | Yehuda Katz <wycats@yehuda-katz.home> | 2009-12-20 18:50:47 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@yehuda-katz.home> | 2009-12-20 18:50:54 -0800 |
commit | 17f66473bce0decb2e5ff23142d4046056ccca1b (patch) | |
tree | 3e40db99f5f0aa5f216697b768da364706c33d83 /actionpack/lib/action_controller/metal/redirecting.rb | |
parent | eeda059818ae95620a7c7b86ad0ff2fa621cbe88 (diff) | |
download | rails-17f66473bce0decb2e5ff23142d4046056ccca1b.tar.gz rails-17f66473bce0decb2e5ff23142d4046056ccca1b.tar.bz2 rails-17f66473bce0decb2e5ff23142d4046056ccca1b.zip |
AC::Head now doesn't have an unfulfilled Rendering dependency, and instead works just fine standalone (which means that ConditionalGet also doesn't have a Rendering dependency)
Diffstat (limited to 'actionpack/lib/action_controller/metal/redirecting.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/redirecting.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb index d101f920e3..39dc23024c 100644 --- a/actionpack/lib/action_controller/metal/redirecting.rb +++ b/actionpack/lib/action_controller/metal/redirecting.rb @@ -62,9 +62,9 @@ module ActionController private def _extract_redirect_to_status(options, response_status) status = if options.is_a?(Hash) && options.key?(:status) - _interpret_status(options.delete(:status)) + ActionDispatch::StatusCodes[options.delete(:status)] elsif response_status.key?(:status) - _interpret_status(response_status[:status]) + ActionDispatch::StatusCodes[response_status[:status]] else 302 end @@ -86,13 +86,5 @@ module ActionController url_for(options) end.gsub(/[\r\n]/, '') end - - def _interpret_status(status) - if status.is_a?(Symbol) - (ActionDispatch::StatusCodes::SYMBOL_TO_STATUS_CODE[status] || 500) - else - status.to_i - end - end end end |