]> source.dussan.org Git - redmine.git/commitdiff
shorten long line of VersionsController
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 24 Oct 2020 14:39:32 +0000 (14:39 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 24 Oct 2020 14:39:32 +0000 (14:39 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20179 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/versions_controller.rb

index 16dd35c9927e8ae564b00a7af67423d0c7a8d005..abf7c1f2accda7abbe99e6364ae29859241ae046 100644 (file)
@@ -177,9 +177,15 @@ class VersionsController < ApplicationController
 
   def retrieve_selected_tracker_ids(selectable_trackers, default_trackers=nil)
     if ids = params[:tracker_ids]
-      @selected_tracker_ids = (ids.is_a? Array) ? ids.collect { |id| id.to_i.to_s } : ids.split('/').collect { |id| id.to_i.to_s }
+      @selected_tracker_ids =
+        if ids.is_a? Array
+          ids.collect {|id| id.to_i.to_s}
+        else
+          ids.split('/').collect {|id| id.to_i.to_s}
+        end
     else
-      @selected_tracker_ids = (default_trackers || selectable_trackers).collect {|t| t.id.to_s }
+      @selected_tracker_ids =
+        (default_trackers || selectable_trackers).collect {|t| t.id.to_s}
     end
   end
 end