app/cells/decidim/consultations/consultation_m_cell.rb in decidim-consultations-0.27.2 vs app/cells/decidim/consultations/consultation_m_cell.rb in decidim-consultations-0.27.3
- old
+ new
@@ -32,12 +32,10 @@
# In order to render the badge inline with the paragraph text we need to
# find the opening `<p>` tag and include the badge right after it. This
# makes the layout look good.
def description
- text = super
- text.sub!(/<p>/, "<p>#{render :badge}")
- html_truncate(text, length: 100)
+ render(:badge) + truncate(strip_tags(super), length: 100)
end
def resource_path
Decidim::Consultations::Engine.routes.url_helpers.consultation_path(model)
end