Sha256: d1565b3822da8b981ef75bde66e906a10264eaf1036981c3566edb052adc7112

Contents?: true

Size: 427 Bytes

Versions: 9

Compression:

Stored size: 427 Bytes

Contents

module Spina
  module Hooks
    class HookComponent < ApplicationComponent
      def initialize(partial:)
        @partial = partial
      end

      def call
        render Spina::Hooks::PartialComponent.with_collection(plugins, partial: @partial)
      end

      def plugins
        Spina::Plugin.all.find_all do |plugin|
          helpers.current_theme.plugins.include?(plugin.name)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spina-2.19.0 app/components/spina/hooks/hook_component.rb
spina-2.18.0 app/components/spina/hooks/hook_component.rb
spina-2.17.0 app/components/spina/hooks/hook_component.rb
spina-2.16.0 app/components/spina/hooks/hook_component.rb
spina-2.15.1 app/components/spina/hooks/hook_component.rb
spina-2.15.0 app/components/spina/hooks/hook_component.rb
spina-2.14.0 app/components/spina/hooks/hook_component.rb
spina-2.13.1 app/components/spina/hooks/hook_component.rb
spina-2.13.0 app/components/spina/hooks/hook_component.rb