From 1cecce1bc809e3684988ed00c0adb578928c40a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 29 Aug 2021 01:19:31 +0200 Subject: [PATCH] Fix Style/RedundantInterpolation rubocop offense It was accidentally added in commit 713ae540b. --- app/models/debate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/debate.rb b/app/models/debate.rb index 06fafcfe1..ce034693f 100644 --- a/app/models/debate.rb +++ b/app/models/debate.rb @@ -165,7 +165,7 @@ class Debate < ApplicationRecord end def description_sanitized - real_description_length = ActionView::Base.full_sanitizer.sanitize("#{description}").squish.length + real_description_length = ActionView::Base.full_sanitizer.sanitize(description.to_s).squish.length if real_description_length < Debate.description_min_length errors.add(:description, :too_short, count: Debate.description_min_length) end