Don't bother with the includes when doing the count - they aren't needed
authorTom Hughes <tom@compton.nu>
Sun, 7 Jun 2009 16:32:00 +0000 (16:32 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 7 Jun 2009 16:32:00 +0000 (16:32 +0000)
and just make it much less efficient.

vendor/plugins/classic_pagination/lib/pagination.rb

index 6a3e1a97b0f661cb63937fc8bbcc6b0b6c533a38..140a7d79bb9d2310c0650c12420011ef98e65fa8 100644 (file)
@@ -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