Add and apply Style/RedundantParentheses rule
Parentheses make the code harder to read in these cases.
This commit is contained in:
@@ -493,6 +493,9 @@ Style/RedundantFreeze:
|
||||
Style/RedundantInterpolation:
|
||||
Enabled: true
|
||||
|
||||
Style/RedundantParentheses:
|
||||
Enabled: true
|
||||
|
||||
Style/RedundantReturn:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class Legislation::ProcessesController < Legislation::BaseController
|
||||
set_process
|
||||
@phase = :debate_phase
|
||||
|
||||
if @process.debate_phase.started? || (current_user&.administrator?)
|
||||
if @process.debate_phase.started? || current_user&.administrator?
|
||||
render :debate
|
||||
else
|
||||
render :phase_not_open
|
||||
@@ -123,7 +123,7 @@ class Legislation::ProcessesController < Legislation::BaseController
|
||||
@proposals = @proposals.send(@current_filter).page(params[:page])
|
||||
end
|
||||
|
||||
if @process.proposals_phase.started? || (current_user&.administrator?)
|
||||
if @process.proposals_phase.started? || current_user&.administrator?
|
||||
legislation_proposal_votes(@proposals)
|
||||
render :proposals
|
||||
else
|
||||
|
||||
@@ -62,7 +62,7 @@ module UsersHelper
|
||||
def show_admin_menu?(user = nil)
|
||||
unless namespace == "officing"
|
||||
current_administrator? || current_moderator? || current_valuator? || current_manager? ||
|
||||
(user&.administrator?) || current_poll_officer? || current_sdg_manager?
|
||||
user&.administrator? || current_poll_officer? || current_sdg_manager?
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ module Measurable
|
||||
|
||||
class_methods do
|
||||
def title_max_length
|
||||
@title_max_length ||= (columns.find { |c| c.name == "title" }&.limit) || 80
|
||||
@title_max_length ||= columns.find { |c| c.name == "title" }&.limit || 80
|
||||
end
|
||||
|
||||
def responsible_name_max_length
|
||||
@responsible_name_max_length ||= (columns.find { |c| c.name == "responsible_name" }&.limit) || 60
|
||||
@responsible_name_max_length ||= columns.find { |c| c.name == "responsible_name" }&.limit || 60
|
||||
end
|
||||
|
||||
def question_max_length
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
<%= raw setting["html.per_page_code_head"] %>
|
||||
</head>
|
||||
<body class="<%= yield (:body_class) %> public">
|
||||
<body class="<%= yield(:body_class) %> public">
|
||||
<%= raw setting["html.per_page_code_body"] %>
|
||||
|
||||
<div class="wrapper <%= yield (:wrapper_class) %>">
|
||||
<div class="wrapper <%= yield(:wrapper_class) %>">
|
||||
<%= render "layouts/header", with_subnavigation: true %>
|
||||
|
||||
<% if request.headers["User-Agent"] =~ /MSIE/ && cookies["ie_alert_closed"] != "true" %>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= image_tag ("annotator_help.gif"), alt: t("annotator.help.alt") %>
|
||||
<%= image_tag "annotator_help.gif", alt: t("annotator.help.alt") %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -29,13 +29,11 @@
|
||||
class: "button hollow expanded"
|
||||
] if feature?(:polls)
|
||||
),
|
||||
(
|
||||
[
|
||||
t("pages.help.menu.processes"),
|
||||
"#processes",
|
||||
class: "button hollow expanded"
|
||||
]
|
||||
),
|
||||
[
|
||||
t("pages.help.menu.processes"),
|
||||
"#processes",
|
||||
class: "button hollow expanded"
|
||||
],
|
||||
[
|
||||
t("pages.help.menu.other"),
|
||||
"#other",
|
||||
|
||||
Reference in New Issue
Block a user