Class: Decidim::Surveys::SurveyLCell
- Inherits:
-
CardLCell
- Object
- CardLCell
- Decidim::Surveys::SurveyLCell
- Includes:
- Decidim::SanitizeHelper
- Defined in:
- app/cells/decidim/surveys/survey_l_cell.rb
Overview
This cell renders the List (:l) survey card for a given instance of a Survey
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
20 21 22 23 24 25 |
# File 'app/cells/decidim/surveys/survey_l_cell.rb', line 20 def description attribute = model.try(:short_description) || model.try(:body) || model.description text = translated_attribute(attribute) decidim_sanitize(html_truncate(text, length: 240), strip_tags: true) end |
#has_description? ⇒ Boolean
12 13 14 |
# File 'app/cells/decidim/surveys/survey_l_cell.rb', line 12 def has_description? true end |
#title ⇒ Object
16 17 18 |
# File 'app/cells/decidim/surveys/survey_l_cell.rb', line 16 def title decidim_sanitize_translated(model.title) end |