]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/plugins/classic_pagination/lib/pagination.rb
Don't bother with the includes when doing the count - they aren't needed
[rails.git] / vendor / plugins / classic_pagination / lib / pagination.rb
index b6e9cf4bc5378d03a7bbf81fd6f8d264acefb681..140a7d79bb9d2310c0650c12420011ef98e65fa8 100644 (file)
@@ -97,8 +97,8 @@ module ActionController
             "Unknown options: #{unknown_option_keys.join(', ')}" unless
               unknown_option_keys.empty?
 
-      options[:singular_name] ||= Inflector.singularize(collection_id.to_s)
-      options[:class_name]  ||= Inflector.camelize(options[:singular_name])
+      options[:singular_name] ||= ActiveSupport::Inflector.singularize(collection_id.to_s)
+      options[:class_name]  ||= ActiveSupport::Inflector.camelize(options[:singular_name])
     end
 
     # Returns a paginator and a collection of Active Record model instances
@@ -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