Please use the new Active Record Query Interface that has been introduced with Rails 3.