aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-09-25 22:37:13 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-09-25 22:37:13 -0300
commit854a454a916bd87bdffad7b756cb6f2f11166a77 (patch)
tree41c20ea4db2e20dd1712ceef88475bffccbe7812 /actionpack
parent80c468c2ad60bed33306589391a8e1f0bebff3fc (diff)
parent2b8a862365e1826eb89abed152517a45046669c6 (diff)
downloadrails-854a454a916bd87bdffad7b756cb6f2f11166a77.tar.gz
rails-854a454a916bd87bdffad7b756cb6f2f11166a77.tar.bz2
rails-854a454a916bd87bdffad7b756cb6f2f11166a77.zip
Merge pull request #21768 from Gaurav2728/gaurav-doc_fix_for_mime
fix Mime type in doc since mime types via constants is deprecated [ci…
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/http/mime_types.rb2
-rw-r--r--actionpack/test/dispatch/mime_type_test.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_types.rb b/actionpack/lib/action_dispatch/http/mime_types.rb
index 0af3e5c0df..04828f7c87 100644
--- a/actionpack/lib/action_dispatch/http/mime_types.rb
+++ b/actionpack/lib/action_dispatch/http/mime_types.rb
@@ -32,5 +32,5 @@ Mime::Type.register "application/json", :json, %w( text/x-json application/jsonr
Mime::Type.register "application/pdf", :pdf, [], %w(pdf)
Mime::Type.register "application/zip", :zip, [], %w(zip)
-# Create Mime::ALL but do not add it to the SET.
+# Create Mime::Type[:ALL] but do not add it to the SET.
Mime::Type.add_type :ALL, Mime::Type::All.new("*/*", :all, [])
diff --git a/actionpack/test/dispatch/mime_type_test.rb b/actionpack/test/dispatch/mime_type_test.rb
index d9fb44f06d..91f6f66fe3 100644
--- a/actionpack/test/dispatch/mime_type_test.rb
+++ b/actionpack/test/dispatch/mime_type_test.rb
@@ -154,10 +154,10 @@ class MimeTypeTest < ActiveSupport::TestCase
end
test "type convenience methods" do
- # Don't test Mime::ALL, since it Mime::ALL#html? == true
+ # Don't test Mime::Type[:ALL], since it Mime::Type[:ALL].html? == true
types = Mime::SET.symbols.uniq - [:all, :iphone]
- # Remove custom Mime::Type instances set in other tests, like Mime::GIF and Mime::IPHONE
+ # Remove custom Mime::Type instances set in other tests, like Mime::Type[:GIF] and Mime::Type[:IPHONE]
types.delete_if { |type| !Mime::Type.registered?(type.upcase) }
types.each do |type|
@@ -186,7 +186,7 @@ class MimeTypeTest < ActiveSupport::TestCase
test "verifiable mime types" do
all_types = Mime::SET.symbols
all_types.uniq!
- # Remove custom Mime::Type instances set in other tests, like Mime::GIF and Mime::IPHONE
+ # Remove custom Mime::Type instances set in other tests, like Mime::Type[:GIF] and Mime::Type[:IPHONE]
all_types.delete_if { |type| !Mime::Type.registered?(type.upcase) }
end