method
const_defined?
v5.0.0.1 -
Show latest stable
- Class:
Mime
const_defined?(sym, inherit = true)public
No documentation available.
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 62
def const_defined?(sym, inherit = true)
ext = sym.downcase
if Mime[ext]
ActiveSupport::Deprecation.warn( Accessing mime types via constants is deprecated. Please change `Mime.const_defined?(#{sym})` to `Mime[:#{ext}]`..squish)
true
else
super
end
end