Class: Decidim::Feeds::ContentBlocks::FeedsSettingsFormCell

Inherits:
ViewModel
  • Object
show all
Defined in:
app/cells/decidim/feeds/content_blocks/feeds_settings_form_cell.rb

Instance Method Summary collapse

Instance Method Details

#available_feedsObject



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_optionsObject



11
12
13
14
15
# File 'app/cells/decidim/feeds/content_blocks/feeds_settings_form_cell.rb', line 11

def available_feeds_options
  available_feeds.map do |component|
    [translated_attribute(component.name), component.id]
  end
end