Skip to content

Commit adfeb79

Browse files
authored
Merge pull request rails#51564 from fatkodima/fix-ids-sql-example
Fix SQL query example in `ActiveRecord::Base#ids` docs [skip ci]
2 parents 0feecd2 + 31e62ff commit adfeb79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/relation/calculations.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def async_pick(*column_names)
363363
# Returns the base model's ID's for the relation using the table's primary key
364364
#
365365
# Person.ids # SELECT people.id FROM people
366-
# Person.joins(:companies).ids # SELECT people.id FROM people INNER JOIN companies ON companies.id = people.company_id
366+
# Person.joins(:company).ids # SELECT people.id FROM people INNER JOIN companies ON companies.id = people.company_id
367367
def ids
368368
primary_key_array = Array(primary_key)
369369

0 commit comments

Comments
 (0)