Add and apply Style/RedundantCondition rule
This is a rule we generally follow all the time but accidentally forgot in one place.
This commit is contained in:
@@ -455,6 +455,9 @@ Style/Proc:
|
|||||||
Style/RaiseArgs:
|
Style/RaiseArgs:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/RedundantCondition:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Style/RedundantFileExtensionInRequire:
|
Style/RedundantFileExtensionInRequire:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ module WelcomeHelper
|
|||||||
def calculate_carousel_size(debates, proposals, apply_offset)
|
def calculate_carousel_size(debates, proposals, apply_offset)
|
||||||
offset = calculate_offset(debates, proposals, apply_offset)
|
offset = calculate_offset(debates, proposals, apply_offset)
|
||||||
centered = calculate_centered(debates, proposals)
|
centered = calculate_centered(debates, proposals)
|
||||||
"#{offset if offset} #{centered if centered}"
|
"#{offset} #{centered}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def calculate_centered(debates, proposals)
|
def calculate_centered(debates, proposals)
|
||||||
|
|||||||
Reference in New Issue
Block a user