instance method qualified_const_set

Ruby on Rails 5.0.7.2

Since v3.2.22.5 Last seen in v5.0.7.2

Available in: v3.2.22.5 v4.0.13 v4.1.16 v4.2.11.3 v5.0.7.2

Signature

qualified_const_set(path, value)

No documentation comment.

Parameters

path req
value req
Source
# File activesupport/lib/active_support/core_ext/module/qualified_const.rb, line 57
  def qualified_const_set(path, value)
    ActiveSupport::Deprecation.warn(<<-MESSAGE.squish)
      Module#qualified_const_set is deprecated in favour of the builtin
      Module#const_set and will be removed in Rails 5.1.
    MESSAGE

    ActiveSupport::QualifiedConstUtils.raise_if_absolute(path)

    const_name = path.demodulize
    mod_name = path.deconstantize
    mod = mod_name.empty? ? self : const_get(mod_name)
    mod.const_set(const_name, value)
  end

Defined in activesupport/lib/active_support/core_ext/module/qualified_const.rb line 57 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Module

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