rubocop fix for redundant self assignment

This commit is contained in:
Brenda Wallace
2017-03-01 17:40:31 +13:00
committed by Shiny
parent 0ecc65bbe0
commit 6c282ffbd7
2 changed files with 1 additions and 7 deletions

View File

@@ -345,12 +345,6 @@ Style/RegexpLiteral:
- 'spec/views/posts/index.html.haml_spec.rb'
- 'spec/views/posts/show.html.haml_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/SelfAssignment:
Exclude:
- 'app/helpers/crops_helper.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles.

View File

@@ -5,7 +5,7 @@ module CropsHelper
seeds = member.seeds.select { |seed| seed.crop.name == crop.name }
seeds.each do |seed|
total_quantity = total_quantity + seed.quantity if seed.quantity
total_quantity += seed.quantity if seed.quantity
end
if !seeds.any?