From: Tom Hughes Date: Sun, 7 Jun 2009 16:32:00 +0000 (+0000) Subject: Don't bother with the includes when doing the count - they aren't needed X-Git-Tag: live~6823^2~27 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6d1167356221c518eb8f1f94745bb33908de826a Don't bother with the includes when doing the count - they aren't needed and just make it much less efficient. --- diff --git a/vendor/plugins/classic_pagination/lib/pagination.rb b/vendor/plugins/classic_pagination/lib/pagination.rb index 6a3e1a97b..140a7d79b 100644 --- a/vendor/plugins/classic_pagination/lib/pagination.rb +++ b/vendor/plugins/classic_pagination/lib/pagination.rb @@ -175,7 +175,6 @@ module ActionController def count_collection_for_pagination(model, options) model.count(:conditions => options[:conditions], :joins => options[:join] || options[:joins], - :include => options[:include], :select => (options[:group] ? "DISTINCT #{options[:group]}" : options[:count])) end