class method self.const_defined?

Ruby on Rails 5.0.7.2

Since v5.0.7.2 Last seen in v5.0.7.2

Signature

self.const_defined?(sym, inherit = true)

No documentation comment.

Parameters

sym req
inherit opt = 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

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close