Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #6869 from bcardarella/active_relation_inspect

Remove ActiveRelation#inspect
  • Loading branch information...
commit f02146789741482bd5ebfa671397c7ec11a21377 2 parents 58c83d4 + 05c7e0a
Jon Leighton jonleighton authored
4 activerecord/CHANGELOG.md
View
@@ -1,5 +1,9 @@
## Rails 4.0.0 (unreleased) ##
+* `ActiveRelation#inspect` no longer calls `#to_a`
+
+ *Brian Cardarella*
+
* Add `collate` and `ctype` support to PostgreSQL. These are available for PostgreSQL 8.4 or later.
Example:
4 activerecord/lib/active_record/relation.rb
View
@@ -492,10 +492,6 @@ def ==(other)
end
end
- def inspect
- to_a.inspect
- end
-
def pretty_print(q)
q.pp(self.to_a)
end
2  activerecord/test/cases/associations/has_many_associations_test.rb
View
@@ -193,7 +193,7 @@ def test_build_and_create_should_not_happen_within_scope
def test_no_sql_should_be_fired_if_association_already_loaded
Car.create(:name => 'honda')
bulbs = Car.first.bulbs
- bulbs.inspect # to load all instances of bulbs
+ bulbs.to_a # to load all instances of bulbs
assert_no_queries do
bulbs.first()
Please sign in to comment.
Something went wrong with that request. Please try again.