Use #scoped instead of .with_scope
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8460 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
1f6764e2af
commit
ed1320f3c9
|
@ -120,12 +120,10 @@ module Redmine
|
||||||
results = []
|
results = []
|
||||||
results_count = 0
|
results_count = 0
|
||||||
|
|
||||||
with_scope(:find => {:conditions => project_conditions}) do
|
scope = scope.scoped({:conditions => project_conditions}).scoped(find_options)
|
||||||
with_scope(:find => find_options) do
|
results_count = scope.count(:all)
|
||||||
results_count = scope.count(:all)
|
results = scope.find(:all, limit_options)
|
||||||
results = scope.find(:all, limit_options)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
[results, results_count]
|
[results, results_count]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue