Class: Decidim::ProcessGroupsContentBlock::ContentBlocks::HighlightedProcessGroupsCell

Inherits:
ViewModel
  • Object
show all
Includes:
ApplicationHelper, LayoutHelper, SanitizeHelper
Defined in:
app/cells/decidim/process_groups_content_block/content_blocks/highlighted_process_groups_cell.rb

Instance Method Summary collapse

Instance Method Details

#decidim_participatory_processesObject



28
29
30
# File 'app/cells/decidim/process_groups_content_block/content_blocks/highlighted_process_groups_cell.rb', line 28

def decidim_participatory_processes
  Decidim::ParticipatoryProcesses::Engine.routes.url_helpers
end

#highlighted_groupsObject



18
19
20
21
22
# File 'app/cells/decidim/process_groups_content_block/content_blocks/highlighted_process_groups_cell.rb', line 18

def highlighted_groups
  OrganizationActiveParticipatoryProcessGroups
    .new(current_organization)
    .query
end

#i18n_scopeObject



24
25
26
# File 'app/cells/decidim/process_groups_content_block/content_blocks/highlighted_process_groups_cell.rb', line 24

def i18n_scope
  "decidim.process_groups_content_block.pages.home.highlighted_process_groups"
end

#showObject



14
15
16
# File 'app/cells/decidim/process_groups_content_block/content_blocks/highlighted_process_groups_cell.rb', line 14

def show
  render if highlighted_groups.any?
end