Fix Style/RedundantInterpolation rubocop offense
It was accidentally added in commit 713ae540b.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user