#22 Eager Loading

Task.find(:all, :include => :projects)
Task.find(:all, :include => [:projects, :comments])
Task.find(:all, :include => [:projects, {:comments => :user}])

你可能感兴趣的:(Ruby,Rails)