From e3c2d2e533e84f7d3ceb9212bc5aa98f5b3db652 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 5 Nov 2019 14:08:35 +0000 Subject: [PATCH] cleanup: rubocop: fix Layout/AlignArguments in ApplicationHelper#parse_redmine_links git-svn-id: http://svn.redmine.org/redmine/trunk@18904 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cc75df138..427b2a8d3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1104,19 +1104,29 @@ module ApplicationHelper end if prefix == 'commit' if repository && (changeset = Changeset.visible.where("repository_id = ? AND scmid LIKE ?", repository.id, "#{name}%").first) - link = link_to h("#{project_prefix}#{repo_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :repository_id => repository.identifier_param, :rev => changeset.identifier}, - :class => 'changeset', - :title => truncate_single_line_raw(changeset.comments, 100) + link = link_to( + h("#{project_prefix}#{repo_prefix}#{name}"), + {:only_path => only_path, :controller => 'repositories', + :action => 'revision', :id => project, + :repository_id => repository.identifier_param, + :rev => changeset.identifier}, + :class => 'changeset', + :title => truncate_single_line_raw(changeset.comments, 100)) end else if repository && User.current.allowed_to?(:browse_repository, project) name =~ %r{^[/\\]*(.*?)(@([^/\\@]+?))?(#(L\d+))?$} path, rev, anchor = $1, $3, $5 - link = link_to h("#{project_prefix}#{prefix}:#{repo_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => (prefix == 'export' ? 'raw' : 'entry'), :id => project, :repository_id => repository.identifier_param, - :path => to_path_param(path), - :rev => rev, - :anchor => anchor}, - :class => (prefix == 'export' ? 'source download' : 'source') + link = + link_to( + h("#{project_prefix}#{prefix}:#{repo_prefix}#{name}"), + {:only_path => only_path, :controller => 'repositories', + :action => (prefix == 'export' ? 'raw' : 'entry'), + :id => project, :repository_id => repository.identifier_param, + :path => to_path_param(path), + :rev => rev, + :anchor => anchor}, + :class => (prefix == 'export' ? 'source download' : 'source')) end end repo_prefix = nil