class method
self.const_defined?
Ruby on Rails 5.0.7.2
Since v5.0.7.2 Last seen in v5.0.7.2Signature
self.const_defined?(sym, inherit = true)
No documentation comment.
Parameters
-
symreq -
inheritopt = true
Source
# File actionpack/lib/action_dispatch/http/mime_type.rb, line 61
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
Defined in actionpack/lib/action_dispatch/http/mime_type.rb line 61
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Mime