Skip to content

Commit

Permalink
Merge pull request #49268 from ghiculescu/cpk-guide
Browse files Browse the repository at this point in the history
Add Composite Primary Keys guide to guides index
  • Loading branch information
eileencodes committed Sep 14, 2023
2 parents da2af18 + 2552482 commit ff30934
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/relation/finder_methods.rb
Expand Up @@ -16,7 +16,7 @@ module FinderMethods
# Person.find("1") # returns the object for ID = 1
# Person.find("31-sarah") # returns the object for ID = 31
# Person.find(1, 2, 6) # returns an array for objects with IDs in (1, 2, 6)
# Person.find([7, 17]) # returns an array for objects with IDs in (7, 17)
# Person.find([7, 17]) # returns an array for objects with IDs in (7, 17), or with composite primary key [7, 17]
# Person.find([1]) # returns an array for the object with ID = 1
# Person.where("administrator = 1").order("created_on DESC").find(1)
#
Expand Down
4 changes: 4 additions & 0 deletions guides/source/documents.yaml
Expand Up @@ -253,6 +253,10 @@
work_in_progress: true
url: active_record_encryption.html
description: This guide covers encrypting your database information using Active Record.
-
name: Composite Primary Keys in Active Record
url: active_record_composite_primary_keys.html
description: This guide is an introduction to composite primary keys for database tables.

-
name: Extending Rails
Expand Down

0 comments on commit ff30934

Please sign in to comment.