performance tweaks for rails 4.1

This commit is contained in:
r888888888
2014-04-24 22:24:42 -07:00
parent a89c57cee0
commit aab03422bc
16 changed files with 22 additions and 16 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ module PostSets
def posts
@posts ||= begin
temp = ::Post.tag_match("#{tag_string} favcount:>3").paginate(page, :search_count => nil, :limit => 5)
temp.all
temp.each # hack to force rails to eager load
temp
end
end
+1 -1
View File
@@ -73,7 +73,7 @@ module PostSets
else
temp = ::Post.tag_match(tag_string).paginate(page, :count => ::Post.fast_count(tag_string), :limit => per_page)
end
temp.all
temp.each # hack to force rails to eager load
temp
end
end