instance method build_with

Ruby on Rails 7.1.6

Since v7.1.6 Private

Available in: v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

build_with(arel)

No documentation comment.

Parameters

arel req
Source
# File activerecord/lib/active_record/relation/query_methods.rb, line 1741
      def build_with(arel)
        return if with_values.empty?

        with_statements = with_values.map do |with_value|
          raise ArgumentError, "Unsupported argument type: #{with_value} #{with_value.class}" unless with_value.is_a?(Hash)

          build_with_value_from_hash(with_value)
        end

        arel.with(with_statements)
      end

Defined in activerecord/lib/active_record/relation/query_methods.rb line 1741 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::QueryMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close