X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6d1167356221c518eb8f1f94745bb33908de826a..b551fef0b77af868ba1c6af933df551f54b5ec12:/vendor/plugins/classic_pagination/lib/pagination.rb diff --git a/vendor/plugins/classic_pagination/lib/pagination.rb b/vendor/plugins/classic_pagination/lib/pagination.rb index 140a7d79b..6a3e1a97b 100644 --- a/vendor/plugins/classic_pagination/lib/pagination.rb +++ b/vendor/plugins/classic_pagination/lib/pagination.rb @@ -175,6 +175,7 @@ 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