Permalink
Browse files

Remove Mime::ALL from Mime::SET.

Signed-off-by: Yehuda Katz <wycats@gmail.com>
  • Loading branch information...
1 parent 3e8ba61 commit 7e280c3bff8ac25f1c1938aeaeb1d0b4c0fbb726 @josevalim josevalim committed with wycats Jul 29, 2009
View
1 actionpack/lib/action_controller/base/mime_responds.rb
@@ -204,6 +204,7 @@ def any(*args, &block)
custom(Mime::ALL, &block)
end
end
+ alias :all :any
def custom(mime_type, &block)
mime_type = mime_type.is_a?(Mime::Type) ? mime_type : Mime::Type.lookup(mime_type.to_s)
View
6 actionpack/lib/action_dispatch/http/mime_types.rb
@@ -2,7 +2,6 @@
# http://www.iana.org/assignments/media-types/
Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml )
-Mime::Type.register "*/*", :all
Mime::Type.register "text/plain", :text, [], %w(txt)
Mime::Type.register "text/javascript", :js, %w( application/javascript application/x-javascript )
Mime::Type.register "text/css", :css
@@ -18,4 +17,7 @@
# http://www.ietf.org/rfc/rfc4627.txt
# http://www.json.org/JSONRequest.html
-Mime::Type.register "application/json", :json, %w( text/x-json application/jsonrequest )
+Mime::Type.register "application/json", :json, %w( text/x-json application/jsonrequest )
+
+# Create Mime::ALL but do not add it to the SET.
+Mime::ALL = Mime::Type.new("*/*", :all, [])

0 comments on commit 7e280c3

Please sign in to comment.