build(associations, base_klass) private

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/join_dependency.rb, line 236
        def build(associations, base_klass)
          associations.map do |name, right|
            reflection = find_reflection base_klass, name
            reflection.check_validity!
            reflection.check_eager_loadable!

            if reflection.polymorphic?
              next unless @eager_loading
              raise EagerLoadPolymorphicError.new(reflection)
            end

            JoinAssociation.new reflection, build(right, reflection.klass)
          end.compact
        end
Register or log in to add new notes.