diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-10-11 12:57:31 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-10-11 12:57:31 +0000 |
commit | d55582dccf911e31eefa964182073f45b745274f (patch) | |
tree | d05e13bf93d15864a40a36d1b74894f2635e6868 | |
parent | d3004f0dfdc8f01e74bc7af4ac9c75b4df86d1d3 (diff) | |
download | redmine-d55582dccf911e31eefa964182073f45b745274f.tar.gz redmine-d55582dccf911e31eefa964182073f45b745274f.zip |
use "do end" instead of {} at ApplicationHelper
git-svn-id: http://svn.redmine.org/redmine/trunk@20141 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/helpers/application_helper.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4161600c7..9f6317f42 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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) |