Fix Style/RedundantInterpolation rubocop offense

It was accidentally added in commit 713ae540b.
This commit is contained in:
Javi Martín
2021-08-29 01:19:31 +02:00
parent 26fed593df
commit 1cecce1bc8

View File

@@ -165,7 +165,7 @@ class Debate < ApplicationRecord
end end
def description_sanitized 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 if real_description_length < Debate.description_min_length
errors.add(:description, :too_short, count: Debate.description_min_length) errors.add(:description, :too_short, count: Debate.description_min_length)
end end