Skip to content

Commit e09e61a

Browse files
Merge pull request rails#50936 from sato11/query-constraints-typo
Correct error in the document for `query_constraints` [ci-skip]
2 parents c0be0a2 + 4dc8668 commit e09e61a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activerecord/lib/active_record/persistence.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def update!(id = :all, attributes)
456456
end
457457

458458
# Accepts a list of attribute names to be used in the WHERE clause
459-
# of SELECT / UPDATE / DELETE queries and in the ORDER BY clause for `#first` and `#last` finder methods.
459+
# of SELECT / UPDATE / DELETE queries and in the ORDER BY clause for +#first+ and +#last+ finder methods.
460460
#
461461
# class Developer < ActiveRecord::Base
462462
# query_constraints :company_id, :id
@@ -469,7 +469,7 @@ def update!(id = :all, attributes)
469469
# developer.update!(name: "Nikita")
470470
# # UPDATE "developers" SET "name" = 'Nikita' WHERE "developers"."company_id" = 1 AND "developers"."id" = 1
471471
#
472-
# It is possible to update attribute used in the query_by clause:
472+
# # It is possible to update an attribute used in the query_constraints clause:
473473
# developer.update!(company_id: 2)
474474
# # UPDATE "developers" SET "company_id" = 2 WHERE "developers"."company_id" = 1 AND "developers"."id" = 1
475475
#

0 commit comments

Comments
 (0)