From 6ffe5632647dfc8fec551ca7003dcf05e776498f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 28 Sep 2019 22:29:25 +0200 Subject: [PATCH] Add an apply StringConversionInInterpolation rule --- .rubocop_basic.yml | 3 +++ app/models/poll/partial_result.rb | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index d675de4e0..d9643ff25 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -126,6 +126,9 @@ Lint/LiteralAsCondition: Lint/ShadowingOuterLocalVariable: Enabled: true +Lint/StringConversionInInterpolation: + Enabled: true + Lint/UselessAssignment: Enabled: true diff --git a/app/models/poll/partial_result.rb b/app/models/poll/partial_result.rb index 4c29144dd..cdb332558 100644 --- a/app/models/poll/partial_result.rb +++ b/app/models/poll/partial_result.rb @@ -21,9 +21,9 @@ class Poll::PartialResult < ApplicationRecord def update_logs if amount_changed? && amount_was.present? - self.amount_log += ":#{amount_was.to_s}" - self.officer_assignment_id_log += ":#{officer_assignment_id_was.to_s}" - self.author_id_log += ":#{author_id_was.to_s}" + self.amount_log += ":#{amount_was}" + self.officer_assignment_id_log += ":#{officer_assignment_id_was}" + self.author_id_log += ":#{author_id_was}" end end end