Sha256: f9039510fbe968fec2e02b612ea47fc5d356ce86e9a0a7ed844dd334f8efd52e

Contents?: true

Size: 475 Bytes

Versions: 19

Compression:

Stored size: 475 Bytes

Contents

# frozen_string_literal: true

module Katalyst
  module Content
    module Editor
      class NewItemsComponent < BaseComponent
        include ::Turbo::FramesHelper

        renders_many :items, Editor::NewItemComponent

        def items
          Katalyst::Content.config.items.map do |item_class|
            item_class = item_class.safe_constantize if item_class.is_a?(String)
            item_class.new(container:)
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
katalyst-content-2.7.0 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.6.2 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.6.1 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.6.0 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.5.1 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.5.0 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.4.2 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.4.1 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.3.2 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.3.1 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.3.0 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.2.0 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.1.4 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.1.3 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.1.2 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.1.1 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.1.0 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.0.1 app/components/katalyst/content/editor/new_items_component.rb
katalyst-content-2.0.0 app/components/katalyst/content/editor/new_items_component.rb