instance method optimize_new_allocation

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

optimize_new_allocation()

No documentation comment.

Source
# File activerecord/lib/active_record/inheritance.rb, line 303
        def optimize_new_allocation
          return if _has_attribute?(inheritance_column)
          return if method(:new).unbind != ActiveRecord::Base.method(:new).unbind

          @_new_optimized = true
          define_singleton_method(:new, Class.instance_method(:new))
        end

Defined in activerecord/lib/active_record/inheritance.rb line 303 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Inheritance::ClassMethods

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