instance method scope_association_reflection

Ruby on Rails 8.0.4

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 140
        def scope_association_reflection(association)
          model = @scope.model
          reflection = model._reflect_on_association(association)
          unless reflection
            raise ArgumentError.new("An association named `:#{association}` does not exist on the model `#{model.name}`.")
          end
          reflection
        end

Defined in activerecord/lib/active_record/relation/query_methods.rb line 140 · 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