diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 5 | ||||
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 7bdbd8ce69..64c20adc87 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -703,8 +703,9 @@ module ActiveRecord # #belongs_to associations. # # Extra options on the associations, as defined in the - # <tt>AssociationReflection::INVALID_AUTOMATIC_INVERSE_OPTIONS</tt> constant, will - # also prevent the association's inverse from being found automatically. + # <tt>AssociationReflection::INVALID_AUTOMATIC_INVERSE_OPTIONS</tt> + # constant, or a custom scope, will also prevent the association's inverse + # from being found automatically. # # The automatic guessing of the inverse association uses a heuristic based # on the name of the class, so it may not work for all associations, diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 29d727477d..0c31f0f57e 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -243,7 +243,7 @@ module ActiveRecord # # ==== Examples # - # # Given a Unique Index on books.isbn and the following record: + # # Given a unique index on <tt>books.isbn</tt> and the following record: # Book.create!(title: 'Rework', author: 'David', isbn: '1') # # # Insert multiple records, allowing new records with the same ISBN @@ -252,8 +252,7 @@ module ActiveRecord # Book.upsert_all([ # { title: 'Eloquent Ruby', author: 'Russ', isbn: '1' }, # { title: 'Clean Code', author: 'Robert', isbn: '2' } - # ], - # unique_by: { columns: %w[ isbn ] }) + # ], unique_by: { columns: %w[ isbn ] }) # def upsert_all(attributes, returning: nil, unique_by: nil) InsertAll.new(self, attributes, on_duplicate: :update, returning: returning, unique_by: unique_by).execute |