From the announcements for Rails 3:
The upcoming version 3 of Ruby on Rails will feature a sexy new querying API from ActiveRecord. Here is an example:
User.order('users.id DESC').limit(20).includes(:items)
In other words, Rails is now Django.
Also:
- Each application now has it’s own name space, application is started with YourAppName.boot for
( Read more... )
Comments 1
User.find(:all, :order => 'id DESC', :limit => 20, :include => :items)
Could be wrong, though. I don't do too much active loading of associations since I normally work with fairly lightweight databases.
The rest sounds interesting. When I do my next project I may have to move my development instance up to the most recent version to try it out.
-Michael
Reply
Leave a comment