diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a4c15e561..881eb6032 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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. diff --git a/app/helpers/crops_helper.rb b/app/helpers/crops_helper.rb index 2b1c08ad7..c4dc00c0c 100644 --- a/app/helpers/crops_helper.rb +++ b/app/helpers/crops_helper.rb @@ -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?