File: //usr/local/rvm/gems/default/doc/activerecord-6.1.4.1/ri/ActiveRecord/QueryMethods/references-i.ri
U:RDoc::AnyMethod[iI"references:ETI"*ActiveRecord::QueryMethods#references;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"SUse to indicate that the given +table_names+ are referenced by an SQL string, ;TI"Pand should therefore be JOINed in any query rather than loaded separately. ;TI";This method only works in conjunction with #includes. ;TI"$See #includes for more details.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [
I"7User.includes(:posts).where("posts.name = 'foo'")
;TI"<# Doesn't JOIN the posts table, resulting in an error.
;TI"
;TI"JUser.includes(:posts).where("posts.name = 'foo'").references(:posts)
;TI"B# Query now knows the string references posts, so adds a JOIN;T:@format0:
@fileI"0lib/active_record/relation/query_methods.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*table_names);T@FI"QueryMethods;TcRDoc::NormalModule00