Permalink
Browse files

favor includes over old AR way

  • Loading branch information...
1 parent 6a86a44 commit cbeb1c1e3d003402950d4a802fb2934a53d44dbc @vijaydev vijaydev committed with fxn Jun 10, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/performance_testing.textile
View
2 railties/guides/source/performance_testing.textile
@@ -66,7 +66,7 @@ resources :posts
# home_controller.rb
class HomeController < ApplicationController
def dashboard
- @users = User.last_ten(:include => :avatars)
+ @users = User.last_ten.includes(:avatars)
@posts = Post.all_today
end
end

0 comments on commit cbeb1c1

Please sign in to comment.