aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorDamien Mathieu <42@dmathieu.com>2012-07-06 16:53:33 +0200
committerDamien Mathieu <42@dmathieu.com>2012-07-06 20:04:38 +0200
commit7d0053e6a716be6345daa5e49dceda27ba8dfdb6 (patch)
treecdc268f748bf4426bb751dff41c18112193b06de /activerecord/CHANGELOG.md
parent717aa92dd3f75dec04652940d5571ab34a2f79c3 (diff)
downloadrails-7d0053e6a716be6345daa5e49dceda27ba8dfdb6.tar.gz
rails-7d0053e6a716be6345daa5e49dceda27ba8dfdb6.tar.bz2
rails-7d0053e6a716be6345daa5e49dceda27ba8dfdb6.zip
Limit the number of records in Relation#inspect
While it's interesting to have the results array, it can make a console or a webpage freeze if there are a lot of them. So this limits the number of records displayed in #inspect to 10 and tells how much were effectively found.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index ccaa2ad8f1..95967c61ee 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -24,12 +24,14 @@
dealing with a `Relation` object rather than an array:.
User.where(:age => 30).inspect
- # => <ActiveRecord::Relation [#<User ...>, #<User ...>]>
+ # => <ActiveRecord::Relation [#<User ...>, #<User ...>] ...>
User.where(:age => 30).to_a.inspect
# => [#<User ...>, #<User ...>]
- *Brian Cardarella & Jon Leighton*
+ The number of records displayed will be limited to 10.
+
+ *Brian Cardarella, Jon Leighton & Damien Mathieu*
* Add `collation` and `ctype` support to PostgreSQL. These are available for PostgreSQL 8.4 or later.
Example: