rails/rails — pull request #14918 by exAspArk (2014-04-30 12:00:51+00:00)
Title: Do not make N+1 queries if collection is already loaded

To fix #14917 (and maybe #5990) I'm suggesting to use loaded records if it's possible