Remove ActiveRelation#inspect
This commit is contained in:
parent
58c83d4c61
commit
05c7e0ae64
@ -1,5 +1,9 @@
|
|||||||
## Rails 4.0.0 (unreleased) ##
|
## 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.
|
* Add `collate` and `ctype` support to PostgreSQL. These are available for PostgreSQL 8.4 or later.
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
@ -492,10 +492,6 @@ def ==(other)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def inspect
|
|
||||||
to_a.inspect
|
|
||||||
end
|
|
||||||
|
|
||||||
def pretty_print(q)
|
def pretty_print(q)
|
||||||
q.pp(self.to_a)
|
q.pp(self.to_a)
|
||||||
end
|
end
|
||||||
|
@ -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
|
def test_no_sql_should_be_fired_if_association_already_loaded
|
||||||
Car.create(:name => 'honda')
|
Car.create(:name => 'honda')
|
||||||
bulbs = Car.first.bulbs
|
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
|
assert_no_queries do
|
||||||
bulbs.first()
|
bulbs.first()
|
||||||
|
Loading…
Reference in New Issue
Block a user