diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-12-26 01:31:11 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-12-26 01:33:20 +0530 |
commit | 2e79ec71a542c2d2e7bedbe12eda0b5e177fb0e0 (patch) | |
tree | d1fa5b93185b70a4124b6d1a7b70960e6b1a19cd /activesupport/test/xml_mini | |
parent | 7f5d44bac548c9f80e2ea88e191356dbb099593e (diff) | |
download | rails-2e79ec71a542c2d2e7bedbe12eda0b5e177fb0e0.tar.gz rails-2e79ec71a542c2d2e7bedbe12eda0b5e177fb0e0.tar.bz2 rails-2e79ec71a542c2d2e7bedbe12eda0b5e177fb0e0.zip |
Model.scoped now returns a relation if invoked without any arguments
Example :
posts = Post.scoped
posts.size # Fires "select count(*) from posts" and returns the count
posts.each {|p| puts p.name } # Fires "select * from posts" and loads post objects
Diffstat (limited to 'activesupport/test/xml_mini')
0 files changed, 0 insertions, 0 deletions