method

new

Importance_0
v8.1.1 - Show latest stable - 0 notes - Class: Branch
new(association:, children:, parent:, associate_by_default:, scope:) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations/preloader/branch.rb, line 11
        def initialize(association,, children,, parent,, associate_by_default,, scope))
          @association = if association
            begin
              @association = association.to_sym
            rescue NoMethodError
              raise ArgumentError, "Association names must be Symbol or String, got: #{association.class.name}"
            end
          end
          @parent = parent
          @scope = scope
          @associate_by_default = associate_by_default

          @children = build_children(children)
          @loaders = nil
        end
Register or log in to add new notes.