Skip to content

Commit 84c9569

Browse files
authored
Merge pull request rails#42175 from OuYangJinTing/Fix-docs-of-active_record_querying-select_all
[ci-skip] fix docs for ActiveRecord select_all
2 parents 908ccc1 + 5811af5 commit 84c9569

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/source/active_record_querying.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,7 @@ This method will return an instance of `ActiveRecord::Result` class and calling
19921992
object would return you an array of hashes where each hash indicates a record.
19931993

19941994
```irb
1995-
irb> Customer.connection.select_all("SELECT first_name, created_at FROM customers WHERE id = '1'").to_hash
1995+
irb> Customer.connection.select_all("SELECT first_name, created_at FROM customers WHERE id = '1'").to_a
19961996
=> [{"first_name"=>"Rafael", "created_at"=>"2012-11-10 23:23:45.281189"}, {"first_name"=>"Eileen", "created_at"=>"2013-12-09 11:22:35.221282"}]
19971997
```
19981998

0 commit comments

Comments
 (0)