summaryrefslogtreecommitdiffstats
path: root/lib/redmine/sort_criteria.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-08-12 08:36:05 +0000
committerGo MAEDA <maeda@farend.jp>2024-08-12 08:36:05 +0000
commit6e21ae720909f9980e58c9411fb9ed8a81f06833 (patch)
treecdf11a115134b45344fe180f829c1686981b47b1 /lib/redmine/sort_criteria.rb
parentb224d878c33d24df81650667d18035652a18911f (diff)
downloadredmine-6e21ae720909f9980e58c9411fb9ed8a81f06833.tar.gz
redmine-6e21ae720909f9980e58c9411fb9ed8a81f06833.zip
Fix RuboCop offense Layout/SpaceAfterComma, one of the offenses enabled in rubocop-rails-omakase (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@22953 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/sort_criteria.rb')
-rw-r--r--lib/redmine/sort_criteria.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/redmine/sort_criteria.rb b/lib/redmine/sort_criteria.rb
index 1825197eb..461cd3ac1 100644
--- a/lib/redmine/sort_criteria.rb
+++ b/lib/redmine/sort_criteria.rb
@@ -34,7 +34,7 @@ module Redmine
end
def to_param
- self.collect {|k,o| k + (o == 'desc' ? ':desc' : '')}.join(',')
+ self.collect {|k, o| k + (o == 'desc' ? ':desc' : '')}.join(',')
end
def to_a
@@ -43,7 +43,7 @@ module Redmine
def add!(key, asc)
key = key.to_s
- delete_if {|k,o| k == key}
+ delete_if {|k, o| k == key}
prepend([key, asc])
normalize!
end
@@ -74,10 +74,10 @@ module Redmine
def sort_clause(sortable_columns)
if sortable_columns.is_a?(Array)
- sortable_columns = sortable_columns.inject({}) {|h,k| h[k]=k; h}
+ sortable_columns = sortable_columns.inject({}) {|h, k| h[k]=k; h}
end
- sql = self.collect do |k,o|
+ sql = self.collect do |k, o|
if s = sortable_columns[k]
s = [s] unless s.is_a?(Array)
s.collect {|c| append_order(c, o)}