method

polymorphic?

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Branch
polymorphic?() 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 102
        def polymorphic?
          return false if root?
          return @polymorphic if defined?(@polymorphic)

          @polymorphic = source_records.any? do |record|
            reflection = record.class._reflect_on_association(association)
            reflection && reflection.options[:polymorphic]
          end
        end
Register or log in to add new notes.