Sha256: 14d721db437e132e8badd4ceb277cc173003637a0484f693d9a134f9159cb942

Contents?: true

Size: 452 Bytes

Versions: 22

Compression:

Stored size: 452 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

22 entries across 22 versions & 1 rubygems

Version Path
spina-2.12.0 app/components/spina/hooks/hook_component.rb
spina-2.11.0 app/components/spina/hooks/hook_component.rb
spina-2.10.0 app/components/spina/hooks/hook_component.rb
spina-2.9.1 app/components/spina/hooks/hook_component.rb
spina-2.9.0 app/components/spina/hooks/hook_component.rb
spina-2.8.1 app/components/spina/hooks/hook_component.rb
spina-2.8.0 app/components/spina/hooks/hook_component.rb
spina-2.7.0 app/components/spina/hooks/hook_component.rb
spina-2.6.2 app/components/spina/hooks/hook_component.rb
spina-2.6.1 app/components/spina/hooks/hook_component.rb
spina-2.6.0 app/components/spina/hooks/hook_component.rb
spina-2.5.0 app/components/spina/hooks/hook_component.rb
spina-2.4.0 app/components/spina/hooks/hook_component.rb
spina-2.3.5 app/components/spina/hooks/hook_component.rb
spina-2.3.4 app/components/spina/hooks/hook_component.rb
spina-2.3.3 app/components/spina/hooks/hook_component.rb
spina-2.3.2 app/components/spina/hooks/hook_component.rb
spina-2.3.1 app/components/spina/hooks/hook_component.rb
spina-2.3.0 app/components/spina/hooks/hook_component.rb
spina-2.2.0 app/components/spina/hooks/hook_component.rb