Skip to content
This repository
Browse code

Merge pull request #6869 from bcardarella/active_relation_inspect

Remove ActiveRelation#inspect
  • Loading branch information...
commit f02146789741482bd5ebfa671397c7ec11a21377 2 parents 58c83d4 + 05c7e0a
Jon Leighton authored June 30, 2012
4  activerecord/CHANGELOG.md
Source Rendered
... ...
@@ -1,5 +1,9 @@
1 1
 ## Rails 4.0.0 (unreleased) ##
2 2
 
  3
+*   `ActiveRelation#inspect` no longer calls `#to_a`
  4
+
  5
+    *Brian Cardarella*
  6
+
3 7
 *   Add `collate` and `ctype` support to PostgreSQL. These are available for PostgreSQL 8.4 or later.
4 8
     Example:
5 9
 
4  activerecord/lib/active_record/relation.rb
@@ -492,10 +492,6 @@ def ==(other)
492 492
       end
493 493
     end
494 494
 
495  
-    def inspect
496  
-      to_a.inspect
497  
-    end
498  
-
499 495
     def pretty_print(q)
500 496
       q.pp(self.to_a)
501 497
     end
2  activerecord/test/cases/associations/has_many_associations_test.rb
@@ -193,7 +193,7 @@ def test_build_and_create_should_not_happen_within_scope
193 193
   def test_no_sql_should_be_fired_if_association_already_loaded
194 194
     Car.create(:name => 'honda')
195 195
     bulbs = Car.first.bulbs
196  
-    bulbs.inspect # to load all instances of bulbs
  196
+    bulbs.to_a # to load all instances of bulbs
197 197
 
198 198
     assert_no_queries do
199 199
       bulbs.first()

0 notes on commit f021467

Please sign in to comment.
Something went wrong with that request. Please try again.