app/cells/decidim/consultations/consultation_m_cell.rb in decidim-consultations-0.26.10 vs app/cells/decidim/consultations/consultation_m_cell.rb in decidim-consultations-0.27.0.rc1
- old
+ new
@@ -32,10 +32,12 @@
# 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
- render(:badge) + truncate(strip_tags(super), length: 100)
+ text = super
+ text.sub!(/<p>/, "<p>#{render :badge}")
+ html_truncate(text, length: 100)
end
def resource_path
Decidim::Consultations::Engine.routes.url_helpers.consultation_path(model)
end