Additional Rails 4.1 optimizations

This commit is contained in:
r888888888
2014-04-25 10:34:27 -07:00
parent aab03422bc
commit e96c936f36
3 changed files with 11 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ module PostSets
end
def posts
favorites.includes(:post).map(&:post).compact
@posts ||= favorites.includes(:post).map(&:post).compact
end
def presenter