diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-01 18:23:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-01 18:23:45 +0000 |
commit | ed1320f3c94a28b22a289043643a06488e38e9fc (patch) | |
tree | 9145ffaa90c96b4fe8894f7b6da65609cb74114e | |
parent | 1f6764e2af6119652865ce5a913f924159b2a101 (diff) | |
download | redmine-ed1320f3c94a28b22a289043643a06488e38e9fc.tar.gz redmine-ed1320f3c94a28b22a289043643a06488e38e9fc.zip |
Use #scoped instead of .with_scope
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8460 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb b/vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb index ed19dc736..1af226ae4 100644 --- a/vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb +++ b/vendor/plugins/acts_as_searchable/lib/acts_as_searchable.rb @@ -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 |