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
|
@ -119,13 +119,11 @@ module Redmine
|
|||
|
||||
results = []
|
||||
results_count = 0
|
||||
|
||||
with_scope(:find => {:conditions => project_conditions}) do
|
||||
with_scope(:find => find_options) do
|
||||
results_count = scope.count(:all)
|
||||
results = scope.find(:all, limit_options)
|
||||
end
|
||||
end
|
||||
|
||||
scope = scope.scoped({:conditions => project_conditions}).scoped(find_options)
|
||||
results_count = scope.count(:all)
|
||||
results = scope.find(:all, limit_options)
|
||||
|
||||
[results, results_count]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue