提交 f0214678 编写于 作者: J Jon Leighton

Merge pull request #6869 from bcardarella/active_relation_inspect

Remove ActiveRelation#inspect
## 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:
......
......@@ -492,10 +492,6 @@ def ==(other)
end
end
def inspect
to_a.inspect
end
def pretty_print(q)
q.pp(self.to_a)
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
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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册