aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/mime_type.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-10-10 02:10:20 -0300
committerGitHub <noreply@github.com>2016-10-10 02:10:20 -0300
commit0cbb0be329e1375e415ad37c9c20ea9f74ff1ac3 (patch)
tree0d0363ee64c840cadf9e0e0d7e32de95633287ae /actionpack/lib/action_dispatch/http/mime_type.rb
parent034e4d38b508cbf2a8eaa9742df3e1948e482827 (diff)
parentde9542acd56f60d281465a59eac11e15ca8b3323 (diff)
downloadrails-0cbb0be329e1375e415ad37c9c20ea9f74ff1ac3.tar.gz
rails-0cbb0be329e1375e415ad37c9c20ea9f74ff1ac3.tar.bz2
rails-0cbb0be329e1375e415ad37c9c20ea9f74ff1ac3.zip
Merge pull request #26746 from rails/deprecations
Remove all deprecations from Action Pack
Diffstat (limited to 'actionpack/lib/action_dispatch/http/mime_type.rb')
-rw-r--r--actionpack/lib/action_dispatch/http/mime_type.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb
index b9121a577c..58eb8d0baf 100644
--- a/actionpack/lib/action_dispatch/http/mime_type.rb
+++ b/actionpack/lib/action_dispatch/http/mime_type.rb
@@ -45,32 +45,6 @@ module Mime
return type if type.is_a?(Type)
EXTENSION_LOOKUP.fetch(type.to_s) { |k| yield k }
end
-
- def const_missing(sym)
- ext = sym.downcase
- if Mime[ext]
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- Accessing mime types via constants is deprecated.
- Please change `Mime::#{sym}` to `Mime[:#{ext}]`.
- MSG
- Mime[ext]
- else
- super
- end
- end
-
- def const_defined?(sym, inherit = true)
- ext = sym.downcase
- if Mime[ext]
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- Accessing mime types via constants is deprecated.
- Please change `Mime.const_defined?(#{sym})` to `Mime[:#{ext}]`.
- MSG
- true
- else
- super
- end
- end
end
# Encapsulates the notion of a mime type. Can be used at render time, for example, with: