Class: Decidim::TagsCell

Inherits:
ViewModel
  • Object
show all
Defined in:
decidim-core/app/cells/decidim/tags_cell.rb

Overview

This cell renders the category of a resource shown with the translated name and links to the resource parent ‘component` and `participatory space` index. The context `resource` must be present example use inside another `cell`:

<%= cell("decidim/category", model.category, context: {resource: model}) %>

Direct Known Subclasses

Budgets::ProjectTagsCell

Instance Method Summary collapse

Instance Method Details

#categoryObject



16
17
18
# File 'decidim-core/app/cells/decidim/tags_cell.rb', line 16

def category
  render if category?
end

#scopeObject



20
21
22
# File 'decidim-core/app/cells/decidim/tags_cell.rb', line 20

def scope
  render if scope?
end

#showObject



12
13
14
# File 'decidim-core/app/cells/decidim/tags_cell.rb', line 12

def show
  render if category? || scope?
end