提交 b02a6936 编写于 作者: R Ryuta Kamizono

Fix incorrect identifier quoting [ci skip]

上级 cdc62d5b
...@@ -243,10 +243,10 @@ def _select!(*fields) # :nodoc: ...@@ -243,10 +243,10 @@ def _select!(*fields) # :nodoc:
# Allows you to change a previously set select statement. # Allows you to change a previously set select statement.
# #
# Post.select(:title, :body) # Post.select(:title, :body)
# # SELECT `posts.title`, `posts.body` FROM `posts` # # SELECT `posts`.`title`, `posts`.`body` FROM `posts`
# #
# Post.select(:title, :body).reselect(:created_at) # Post.select(:title, :body).reselect(:created_at)
# # SELECT `posts.created_at` FROM `posts` # # SELECT `posts`.`created_at` FROM `posts`
# #
# This is short-hand for <tt>unscope(:select).select(fields)</tt>. # This is short-hand for <tt>unscope(:select).select(fields)</tt>.
# Note that we're unscoping the entire select statement. # Note that we're unscoping the entire select statement.
......
...@@ -819,19 +819,19 @@ Post.select(:title, :body).reselect(:created_at) ...@@ -819,19 +819,19 @@ Post.select(:title, :body).reselect(:created_at)
The SQL that would be executed: The SQL that would be executed:
```sql ```sql
SELECT `posts.created_at` FROM `posts` SELECT `posts`.`created_at` FROM `posts`
``` ```
In case the `reselect` clause is not used, In case the `reselect` clause is not used,
```ruby ```ruby
Post.select(:title, :body) Post.select(:title, :body).select(:created_at)
``` ```
the SQL executed would be: the SQL executed would be:
```sql ```sql
SELECT `posts.title`, `posts.body` FROM `posts` SELECT `posts`.`title`, `posts`.`body`, `posts`.`created_at` FROM `posts`
``` ```
### `reorder` ### `reorder`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册