aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-06-19 20:41:15 -0400
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-10-10 01:35:58 -0300
commit2a3718f434ac9dfeac3473c41a78d81aba9dbc1b (patch)
tree773b6c5d965b754fde0cfee154454df36f3fe7db /actionpack/lib/action_dispatch
parent98b8309569a326910a723f521911e54994b112fb (diff)
downloadrails-2a3718f434ac9dfeac3473c41a78d81aba9dbc1b.tar.gz
rails-2a3718f434ac9dfeac3473c41a78d81aba9dbc1b.tar.bz2
rails-2a3718f434ac9dfeac3473c41a78d81aba9dbc1b.zip
Remove deprecated access to mime types through constants
Diffstat (limited to 'actionpack/lib/action_dispatch')
-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: