aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/persistence.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-04-03 12:46:53 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-04-03 12:46:53 +0900
commitbffacccc6a60d9f47b7ac2e7edafda0a66f59ddd (patch)
tree6b414c59c7a3b979acd8c3c89fa306fe8579a05e /activerecord/lib/active_record/persistence.rb
parent2c44e22942cdf8e93a72084db2773f088b4ad486 (diff)
downloadrails-bffacccc6a60d9f47b7ac2e7edafda0a66f59ddd.tar.gz
rails-bffacccc6a60d9f47b7ac2e7edafda0a66f59ddd.tar.bz2
rails-bffacccc6a60d9f47b7ac2e7edafda0a66f59ddd.zip
Fix the markup for `insert_all` and `upsert_all` docs [ci skip]
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r--activerecord/lib/active_record/persistence.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb
index 7705cefa59..4ef0c1b6a6 100644
--- a/activerecord/lib/active_record/persistence.rb
+++ b/activerecord/lib/active_record/persistence.rb
@@ -107,9 +107,9 @@ module ActiveRecord
# unique_by: %i[ author_id name ]
# unique_by: :index_books_on_isbn
#
- # Because it relies on the index information from the database
- # <tt>:unique_by</tt> is recommended to be paired with
- # Active Record's schema_cache.
+ # Because it relies on the index information from the database
+ # <tt>:unique_by</tt> is recommended to be paired with
+ # Active Record's schema_cache.
#
# ==== Example
#
@@ -224,9 +224,9 @@ module ActiveRecord
# unique_by: %i[ author_id name ]
# unique_by: :index_books_on_isbn
#
- # Because it relies on the index information from the database
- # <tt>:unique_by</tt> is recommended to be paired with
- # Active Record's schema_cache.
+ # Because it relies on the index information from the database
+ # <tt>:unique_by</tt> is recommended to be paired with
+ # Active Record's schema_cache.
#
# ==== Examples
#
@@ -238,7 +238,7 @@ module ActiveRecord
# { title: "Eloquent Ruby", author: "Russ", isbn: "1" }
# ], unique_by: :isbn)
#
- # Book.find_by(isbn: "1").title # => "Eloquent Ruby"
+ # Book.find_by(isbn: "1").title # => "Eloquent Ruby"
def upsert_all(attributes, returning: nil, unique_by: nil)
InsertAll.new(self, attributes, on_duplicate: :update, returning: returning, unique_by: unique_by).execute
end