Class: Decidim::ParticipatoryProcessGroups::ContentBlocks::TitleCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::ParticipatoryProcessGroups::ContentBlocks::TitleCell
- Includes:
- IconHelper, SanitizeHelper, TwitterSearchHelper
- Defined in:
- app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb
Instance Method Summary collapse
- #decidim_participatory_processes ⇒ Object
- #group_url_text ⇒ Object
- #has_group_url? ⇒ Boolean
- #has_hashtag? ⇒ Boolean
- #has_meta_scope? ⇒ Boolean
- #hashtag_text ⇒ Object
- #meta_scope ⇒ Object
- #participatory_process_group ⇒ Object
- #participatory_processes_count ⇒ Object
Instance Method Details
#decidim_participatory_processes ⇒ Object
41 42 43 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 41 def decidim_participatory_processes Decidim::ParticipatoryProcesses::Engine.routes.url_helpers end |
#group_url_text ⇒ Object
37 38 39 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 37 def group_url_text group_uri.host + group_uri.path end |
#has_group_url? ⇒ Boolean
25 26 27 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 25 def has_group_url? group_url.present? end |
#has_hashtag? ⇒ Boolean
21 22 23 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 21 def has_hashtag? hashtag_text.present? end |
#has_meta_scope? ⇒ Boolean
33 34 35 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 33 def .present? end |
#hashtag_text ⇒ Object
17 18 19 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 17 def hashtag_text @hashtag_text ||= decidim_html_escape(participatory_process_group.hashtag || "") end |
#meta_scope ⇒ Object
29 30 31 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 29 def @meta_scope ||= translated_attribute(participatory_process_group.) end |
#participatory_process_group ⇒ Object
13 14 15 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 13 def participatory_process_group @participatory_process_group ||= Decidim::ParticipatoryProcessGroup.find(model.scoped_resource_id) end |
#participatory_processes_count ⇒ Object
45 46 47 |
# File 'app/cells/decidim/participatory_process_groups/content_blocks/title_cell.rb', line 45 def participatory_processes_count @participatory_processes_count ||= processes.count end |