]> source.dussan.org Git - redmine.git/commitdiff
use "do end" instead of {} at ApplicationHelper
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 11 Oct 2020 12:57:31 +0000 (12:57 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 11 Oct 2020 12:57:31 +0000 (12:57 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20141 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb

index 4161600c748d466375383a13c384ac5993e20f6b..9f6317f42c73dc0cd6f1f5ad7a17fd2d1c60990b 100644 (file)
@@ -511,13 +511,13 @@ module ApplicationHelper
     end
     jump = params[:jump].presence || current_menu_item
     s = (+'').html_safe
-    build_project_link = ->(project, level = 0){
+    build_project_link = ->(project, level = 0) do
       padding = level * 16
       text = content_tag('span', project.name, :style => "padding-left:#{padding}px;")
       s << link_to(text, project_path(project, :jump => jump),
                    :title => project.name,
                    :class => (project == selected ? 'selected' : nil))
-    }
+    end
     [
       [bookmarked, :label_optgroup_bookmarks, true],
       [recents,   :label_optgroup_recents,    false],
@@ -706,7 +706,10 @@ module ApplicationHelper
           b << "\xe2\x80\xa6"
           ancestors = ancestors[-2, 2]
         end
-        b += ancestors.collect {|p| link_to_project(p, {:jump => current_menu_item}, :class => 'ancestor') }
+        b +=
+          ancestors.collect do |p|
+            link_to_project(p, {:jump => current_menu_item}, :class => 'ancestor')
+          end
       end
       b << content_tag(:span, h(@project), class: 'current-project')
       if b.size > 1
@@ -1723,9 +1726,9 @@ module ApplicationHelper
         messages[message] << item
       end
     end
-    messages.map { |message, items|
+    messages.map do |message, items|
       "#{message}: " + items.map {|i| "##{i.id}"}.join(', ')
-    }
+    end
   end
 
   def render_if_exist(options = {}, locals = {}, &block)