I think you really want to use it here includesif you want to access the attributes of the association after completing the request. The same request will be
Post.includes(:user).first.user.name
: select * from users select * from posts where posts.user_id in (id1, id2, id3...) ( post belongs_to user), , . Rails: include vs.: join.
Arel join, , . Post.includes(:user).where('users.name = "Bo Bob"') join, Post.