]> source.dussan.org Git - redmine.git/commitdiff
add space after comma to lib/redmine/search.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 28 Oct 2020 14:42:59 +0000 (14:42 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 28 Oct 2020 14:42:59 +0000 (14:42 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20224 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/search.rb

index 2d51717e4ce495b768be769c0c7e6ef51c8beaf6..92640e30c6cfad71c391d75b5f9f714b588dca86 100644 (file)
@@ -75,7 +75,7 @@ module Redmine
 
       # Returns the result count by type
       def result_count_by_type
-        ret = Hash.new {|h,k| h[k] = 0}
+        ret = Hash.new {|h, k| h[k] = 0}
         result_ids.group_by(&:first).each do |scope, ids|
           ret[scope] += ids.size
         end
@@ -85,7 +85,7 @@ module Redmine
       # Returns the results for the given offset and limit
       def results(offset, limit)
         result_ids_to_load = result_ids[offset, limit] || []
-        results_by_scope = Hash.new {|h,k| h[k] = []}
+        results_by_scope = Hash.new {|h, k| h[k] = []}
         result_ids_to_load.group_by(&:first).each do |scope, scope_and_ids|
           klass = scope.singularize.camelcase.constantize
           results_by_scope[scope] += klass.search_results_from_ids(scope_and_ids.map(&:last))
@@ -128,7 +128,7 @@ module Redmine
           ret += ranks_and_ids_in_scope.map {|rs| [scope, rs]}
         end
         # sort results, higher rank and id first
-        ret.sort! {|a,b| b.last <=> a.last}
+        ret.sort! {|a, b| b.last <=> a.last}
         # only keep ids now that results are sorted
         ret.map! {|scope, r| [scope, r.last]}
         ret