instance method
scope_association_reflection
Ruby on Rails 8.1.2
Since v7.0.10 PrivateSignature
scope_association_reflection(association)
No documentation comment.
Parameters
-
associationreq
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