Added CSV to Mime::SET so that respond_to csv will work

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Tobias Lütke
2006-11-24 16:35:00 +00:00
parent 7c7d58937b
commit ad62d461e8
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
*SVN*
* Added CSV to Mime::SET so that respond_to csv will work [Cody Fauser]
* Fixed that HEAD should return the proper Content-Length header (that is, actually use @body.size, not just 0) [DHH]
* Added GET-masquarading for HEAD, so request.method will return :get even for HEADs. This will help anyone relying on case request.method to automatically work with HEAD and map.resources will also allow HEADs to all GET actions. Rails automatically throws away the response content in a reply to HEAD, so you don't even need to worry about that. If you, for whatever reason, still need to distinguish between GET and HEAD in some edge case, you can use Request#head? and even Request.headers["REQUEST_METHOD"] for get the "real" answer. Closes #6694 [DHH]

View File

@@ -141,7 +141,7 @@ module Mime
ATOM = Type.new "application/atom+xml", :atom
YAML = Type.new "application/x-yaml", :yaml, %w( text/yaml )
SET = [ ALL, TEXT, HTML, JS, ICS, XML, RSS, ATOM, YAML ]
SET = [ ALL, TEXT, HTML, JS, ICS, XML, RSS, ATOM, YAML, CSV ]
LOOKUP = Hash.new { |h, k| h[k] = Type.new(k) unless k == "" }