mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/controllers/context_menus_controller.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18774 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
adff3bcb7e
commit
0365bd552e
@ -1187,7 +1187,6 @@ Style/ParallelAssignment:
|
|||||||
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
# Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions.
|
||||||
Style/ParenthesesAroundCondition:
|
Style/ParenthesesAroundCondition:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'app/controllers/context_menus_controller.rb'
|
|
||||||
- 'app/helpers/application_helper.rb'
|
- 'app/helpers/application_helper.rb'
|
||||||
- 'app/models/project.rb'
|
- 'app/models/project.rb'
|
||||||
- 'app/models/query.rb'
|
- 'app/models/query.rb'
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class ContextMenusController < ApplicationController
|
|||||||
before_action :find_issues, :only => :issues
|
before_action :find_issues, :only => :issues
|
||||||
|
|
||||||
def issues
|
def issues
|
||||||
if (@issues.size == 1)
|
if @issues.size == 1
|
||||||
@issue = @issues.first
|
@issue = @issues.first
|
||||||
end
|
end
|
||||||
@issue_ids = @issues.map(&:id).sort
|
@issue_ids = @issues.map(&:id).sort
|
||||||
@ -68,7 +68,7 @@ class ContextMenusController < ApplicationController
|
|||||||
preload(:user).to_a
|
preload(:user).to_a
|
||||||
|
|
||||||
(render_404; return) unless @time_entries.present?
|
(render_404; return) unless @time_entries.present?
|
||||||
if (@time_entries.size == 1)
|
if @time_entries.size == 1
|
||||||
@time_entry = @time_entries.first
|
@time_entry = @time_entries.first
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user