diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-12-10 22:02:50 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-12-10 22:02:50 -0600 |
commit | 1b82590c36bb1404f7b7a9aa9cf196253685d73f (patch) | |
tree | 33e065c8bc34b6cb4d93996170188219eb138c46 /actionpack/lib/action_dispatch/http/status_codes.rb | |
parent | c517a4fb9a6388ab561615f8556043ce03d531bd (diff) | |
download | rails-1b82590c36bb1404f7b7a9aa9cf196253685d73f.tar.gz rails-1b82590c36bb1404f7b7a9aa9cf196253685d73f.tar.bz2 rails-1b82590c36bb1404f7b7a9aa9cf196253685d73f.zip |
Reduce usage of interpret_status. It should also return a integer
not a string.
Diffstat (limited to 'actionpack/lib/action_dispatch/http/status_codes.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/status_codes.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/actionpack/lib/action_dispatch/http/status_codes.rb b/actionpack/lib/action_dispatch/http/status_codes.rb index 5bac842ec1..ea1475e827 100644 --- a/actionpack/lib/action_dispatch/http/status_codes.rb +++ b/actionpack/lib/action_dispatch/http/status_codes.rb @@ -21,22 +21,5 @@ module ActionDispatch hash[ActiveSupport::Inflector.underscore(message.gsub(/ /, "")).to_sym] = code hash }.freeze - - private - # Given a status parameter, determine whether it needs to be converted - # to a string. If it is a fixnum, use the STATUS_CODES hash to lookup - # the default message. If it is a symbol, use the SYMBOL_TO_STATUS_CODE - # hash to convert it. - def interpret_status(status) - case status - when Fixnum then - "#{status} #{STATUS_CODES[status]}".strip - when Symbol then - interpret_status(SYMBOL_TO_STATUS_CODE[status] || - "500 Unknown Status #{status.inspect}") - else - status.to_s - end - end end end |