Class: Decidim::DataConsentCell

Inherits:
ViewModel
  • Object
show all
Defined in:
app/cells/decidim/data_consent_cell.rb

Instance Method Summary collapse

Instance Method Details

#categoriesObject



9
10
11
12
13
14
15
16
17
18
19
# File 'app/cells/decidim/data_consent_cell.rb', line 9

def categories
  @categories ||= Decidim.consent_categories.map do |category|
    {
      slug: category[:slug],
      title: t("layouts.decidim.data_consent.modal.#{category[:slug]}.title"),
      description: t("layouts.decidim.data_consent.modal.#{category[:slug]}.description"),
      mandatory: category[:mandatory],
      items: category.has_key?(:items) ? category[:items] : []
    }
  end
end

#showObject



5
6
7
# File 'app/cells/decidim/data_consent_cell.rb', line 5

def show
  render
end