Slide 23
Slide 23 text
class PostsController < ApplicationController
def index
@posts = Post.limit(10)
end
end
@posts = Post.limit(10).includes(:author)
SELECT * FROM posts LIMIT 10;
SELECT * FROM authors WHERE id IN
(13, 15, 21, 33, 37, 42, 46, 47, 53, 55);