Class: Decidim::Feeds::ContentBlocks::FeedsSettingsFormCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::Feeds::ContentBlocks::FeedsSettingsFormCell
- Defined in:
- app/cells/decidim/feeds/content_blocks/feeds_settings_form_cell.rb
Instance Method Summary collapse
Instance Method Details
#available_feeds ⇒ Object
17 18 19 |
# File 'app/cells/decidim/feeds/content_blocks/feeds_settings_form_cell.rb', line 17 def available_feeds @available_feeds ||= Decidim::Component.where(manifest_name: "posts").where(participatory_space_id: current_organization.participatory_spaces.pluck(:id)) end |
#available_feeds_options ⇒ Object
11 12 13 14 15 |
# File 'app/cells/decidim/feeds/content_blocks/feeds_settings_form_cell.rb', line 11 def available_feeds.map do |component| [translated_attribute(component.name), component.id] end end |