Sha256: 450d3a45aa5ab26857ab31dd66cbda288be4a24e285909fe3c0163913a61b50c
Contents?: true
Size: 701 Bytes
Versions: 1
Compression:
Stored size: 701 Bytes
Contents
# frozen_string_literal: true module Decidim module Posts module ContentBlocks class PostsSettingsFormCell < Decidim::ViewModel # Found in HighlightedElementsForComponentSettingsFormCell #include Decidim::ContentBlocks::HasRelatedComponents alias form model def available_feeds_options available_feeds.map do |component| [translated_attribute(component.name), component.id] end end def available_feeds @available_feeds ||= Decidim::Component.where(manifest_name: "posts").where(participatory_space_id: current_organization.participatory_spaces.pluck(:id)) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
decidim-posts-1.0.0 | app/cells/decidim/posts/content_blocks/posts_settings_form_cell.rb |