diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-06 09:46:04 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-06 09:46:04 +0000 |
commit | dbf42e379becc5612a0efe3476a999a9d6d803f0 (patch) | |
tree | 63809e19f53fc202369acae0bd027ba2352b9d2a /actionpack/lib/action_controller/deprecated_request_methods.rb | |
parent | e0cded2bbfc72ebbdae5b3c5926dc67f8fb59631 (diff) | |
download | rails-dbf42e379becc5612a0efe3476a999a9d6d803f0.tar.gz rails-dbf42e379becc5612a0efe3476a999a9d6d803f0.tar.bz2 rails-dbf42e379becc5612a0efe3476a999a9d6d803f0.zip |
Prefer MIME constants to strings. Closes #7707.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6350 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/deprecated_request_methods.rb')
-rw-r--r-- | actionpack/lib/action_controller/deprecated_request_methods.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/deprecated_request_methods.rb b/actionpack/lib/action_controller/deprecated_request_methods.rb index a6cf87e358..93663bdda4 100644 --- a/actionpack/lib/action_controller/deprecated_request_methods.rb +++ b/actionpack/lib/action_controller/deprecated_request_methods.rb @@ -6,10 +6,10 @@ module ActionController # For backward compatibility, the post format is extracted from the # X-Post-Data-Format HTTP header if present. def post_format - case content_type.to_s - when 'application/xml' + case content_type + when Mime::XML :xml - when 'application/x-yaml' + when Mime::YAML :yaml else :url_encoded |