ruby on rails - Chaining ActiveRecord::QueryMethods#select returns additional records -
i'm having strange situation calling article.comments
doesn't bring records should, if add `select, comes up. i'm seeing things this:
article.comments #=> [] article.comments.select(:id) #=> [#<comment:0x12341234 id: 1>]
took @ sql , there's no difference, it's selecting comments.*
vs comments.id
. responsible this?
Comments
Post a Comment