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:
Jean-Philippe Lang 2012-01-01 18:23:45 +00:00
parent 1f6764e2af
commit ed1320f3c9
1 changed files with 5 additions and 7 deletions

View File

@ -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