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