Don't bother with the includes when doing the count - they aren't needed
and just make it much less efficient.
This commit is contained in:
parent
03dc9ec8cb
commit
6d11673562
1 changed files with 0 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue