Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Changeset [a7fd564ab197a376336ebfa8bceaf14553e7628f] by Pratik Naik

Revision a7fd564ab197a376336ebfa8bceaf14553e7628f, committed by Pratik Naik · December 25th, 2009 @ 09:36 PM

Add Model.select/group/order/limit/joins/conditions/preload/eager_load class methods returning a lazy relation.

Examples :

posts = Post.select('id).order('name') # Returns a lazy relation
posts.each {|p| puts p.id } # Fires "select id from posts order by name"

http://github.com/rails/rails/commit/a7fd564ab197a376336ebfa8bceaf1...

4 changed files

  • M activerecord/lib/active_record/base.rb
  • M activerecord/lib/active_record/named_scope.rb
  • M activerecord/lib/active_record/relation.rb
  • M activerecord/test/cases/relations_test.rb