Apply Style/RedundantReturn rubocop rule
We were already following this pattern most of the time.
This commit is contained in:
@@ -409,6 +409,9 @@ Style/Proc:
|
||||
Style/RedundantFreeze:
|
||||
Enabled: true
|
||||
|
||||
Style/RedundantReturn:
|
||||
Enabled: true
|
||||
|
||||
Style/SafeNavigation:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ module SignatureSheetsHelper
|
||||
text_help += tag(:br)
|
||||
text_help += t("admin.signature_sheets.new.text_help.required_fields_structure_note")
|
||||
|
||||
return text_help
|
||||
text_help
|
||||
end
|
||||
|
||||
def example_text_help
|
||||
@@ -45,6 +45,6 @@ module SignatureSheetsHelper
|
||||
end
|
||||
|
||||
text_example += "#{example_1}; #{example_2}"
|
||||
return text_example
|
||||
text_example
|
||||
end
|
||||
end
|
||||
|
||||
@@ -165,6 +165,6 @@ class Debate < ApplicationRecord
|
||||
def self.debates_orders(user)
|
||||
orders = %w[hot_score confidence_score created_at relevance]
|
||||
orders << "recommendations" if Setting["feature.user.recommendations_on_debates"] && user&.recommended_debates
|
||||
return orders
|
||||
orders
|
||||
end
|
||||
end
|
||||
|
||||
@@ -40,7 +40,7 @@ class I18nContent < ApplicationRecord
|
||||
return output.update({ path => input }) unless input.is_a? Hash
|
||||
|
||||
input.map { |key, value| flat_hash(value, [path, key].compact.join("."), output) }
|
||||
return output
|
||||
output
|
||||
end
|
||||
|
||||
def self.content_for(tab)
|
||||
|
||||
@@ -243,7 +243,7 @@ class Proposal < ApplicationRecord
|
||||
def self.proposals_orders(user)
|
||||
orders = %w[hot_score confidence_score created_at relevance archival_date]
|
||||
orders << "recommendations" if Setting["feature.user.recommendations_on_proposals"] && user&.recommended_proposals
|
||||
return orders
|
||||
orders
|
||||
end
|
||||
|
||||
def skip_user_verification?
|
||||
|
||||
@@ -52,11 +52,11 @@ class SignatureSheet < ApplicationRecord
|
||||
|
||||
def parse_postal_code(required_fields_to_verify)
|
||||
if Setting.force_presence_date_of_birth? && Setting.force_presence_postal_code?
|
||||
return required_fields_to_verify[2]
|
||||
required_fields_to_verify[2]
|
||||
elsif Setting.force_presence_postal_code?
|
||||
return required_fields_to_verify[1]
|
||||
required_fields_to_verify[1]
|
||||
else
|
||||
return nil
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -308,7 +308,7 @@ def documentable_redirected_to_resource_show_or_navigate_to
|
||||
find("a", text: "Not now, go to my proposal")
|
||||
click_on "Not now, go to my proposal"
|
||||
rescue
|
||||
return
|
||||
nil
|
||||
end
|
||||
|
||||
def documentable_attach_new_file(path, success = true)
|
||||
|
||||
@@ -254,7 +254,7 @@ def imageable_redirected_to_resource_show_or_navigate_to
|
||||
find("a", text: "Not now, go to my proposal")
|
||||
click_on "Not now, go to my proposal"
|
||||
rescue
|
||||
return
|
||||
nil
|
||||
end
|
||||
|
||||
def imageable_attach_new_file(_imageable_factory_name, path, success = true)
|
||||
|
||||
Reference in New Issue
Block a user