Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrap Arel.sql to avoid error in doc of insert_all, upsert_all #48448

Merged
merged 1 commit into from
Jun 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions activerecord/lib/active_record/persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def insert(attributes, returning: nil, unique_by: nil, record_timestamps: nil)
# clause entirely.
#
# You can also pass an SQL string if you need more control on the return values
# (for example, <tt>returning: "id, name as new_name"</tt>).
# (for example, <tt>returning: Arel.sql("id, name as new_name")</tt>).
#
# [:unique_by]
# (PostgreSQL and SQLite only) By default rows are considered to be unique
Expand Down Expand Up @@ -212,7 +212,7 @@ def insert!(attributes, returning: nil, record_timestamps: nil)
# clause entirely.
#
# You can also pass an SQL string if you need more control on the return values
# (for example, <tt>returning: "id, name as new_name"</tt>).
# (for example, <tt>returning: Arel.sql("id, name as new_name")</tt>).
#
# [:record_timestamps]
# By default, automatic setting of timestamp columns is controlled by
Expand Down Expand Up @@ -278,7 +278,7 @@ def upsert(attributes, on_duplicate: :update, returning: nil, unique_by: nil, re
# clause entirely.
#
# You can also pass an SQL string if you need more control on the return values
# (for example, <tt>returning: "id, name as new_name"</tt>).
# (for example, <tt>returning: Arel.sql("id, name as new_name")</tt>).
#
# [:unique_by]
# (PostgreSQL and SQLite only) By default rows are considered to be unique
Expand Down