belongs_to association loaded individually even after eager loading
问题 I have the below association class Picture < ActiveRecord::Base belongs_to :user end class User < ActiveRecord::Base has_many :pictures end And in my PicturesController i am eager loading the user class PicturesController < ApplicationController def index @pictures = Picture.includes(:user).all end end In my view, i am displaying each pictures user name -@pictures.each do |picture| %tr %td= picture.name %td= picture.user.name Now the question is, even though i am eager loading the user, i see