instance method scope_association_reflection

Ruby on Rails 7.0.10

Since v7.0.10 Private

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

Signature

scope_association_reflection(association)

No documentation comment.

Parameters

association req
Source
# File activerecord/lib/active_record/relation/query_methods.rb, line 123
        def scope_association_reflection(association)
          reflection = @scope.klass._reflect_on_association(association)
          unless reflection
            raise ArgumentError.new("An association named `:#{association}` does not exist on the model `#{@scope.name}`.")
          end
          reflection
        end

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

Defined in ActiveRecord::QueryMethods::WhereChain

Type at least 2 characters to search.

↑↓ navigate · open · esc close