mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 14:26:04 +01:00
code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/helpers/application_helper.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18822 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -1161,7 +1161,6 @@ Style/ParallelAssignment:
|
|||||||
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
||||||
Style/ParenthesesAroundCondition:
|
Style/ParenthesesAroundCondition:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/helpers/application_helper.rb'
|
|
||||||
- 'app/models/project.rb'
|
- 'app/models/project.rb'
|
||||||
- 'app/models/query.rb'
|
- 'app/models/query.rb'
|
||||||
- 'app/models/repository/subversion.rb'
|
- 'app/models/repository/subversion.rb'
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ module ApplicationHelper
|
|||||||
def link_to_group(group, options={})
|
def link_to_group(group, options={})
|
||||||
if group.is_a?(Group)
|
if group.is_a?(Group)
|
||||||
name = h(group.name)
|
name = h(group.name)
|
||||||
if (User.current.admin?)
|
if User.current.admin?
|
||||||
only_path = options[:only_path].nil? ? true : options[:only_path]
|
only_path = options[:only_path].nil? ? true : options[:only_path]
|
||||||
link_to name, edit_group_path(group, :only_path => only_path)
|
link_to name, edit_group_path(group, :only_path => only_path)
|
||||||
else
|
else
|
||||||
@@ -377,12 +377,12 @@ module ApplicationHelper
|
|||||||
projects.sort_by(&:lft).each do |project|
|
projects.sort_by(&:lft).each do |project|
|
||||||
# set the project environment to please macros.
|
# set the project environment to please macros.
|
||||||
@project = project
|
@project = project
|
||||||
if (ancestors.empty? || project.is_descendant_of?(ancestors.last))
|
if ancestors.empty? || project.is_descendant_of?(ancestors.last)
|
||||||
s << "<ul class='projects #{ ancestors.empty? ? 'root' : nil}'>\n"
|
s << "<ul class='projects #{ ancestors.empty? ? 'root' : nil}'>\n"
|
||||||
else
|
else
|
||||||
ancestors.pop
|
ancestors.pop
|
||||||
s << "</li>"
|
s << "</li>"
|
||||||
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
|
while ancestors.any? && !project.is_descendant_of?(ancestors.last)
|
||||||
ancestors.pop
|
ancestors.pop
|
||||||
s << "</ul></li>\n"
|
s << "</ul></li>\n"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user