Sha256: 0bc7f0738fab88e970230fa4fc287b75b069fdd87f2e713dbbe349e296b8fec9

Contents?: true

Size: 768 Bytes

Versions: 22

Compression:

Stored size: 768 Bytes

Contents

require 'hanami/view/rendering/partial_finder'

module Hanami
  module View
    module Rendering
      # Rendering partial
      #
      # It's used when a template wants to render a partial.
      #
      # @api private
      # @since 0.1.0
      #
      # @see Hanami::View::Rendering::Template
      # @see Hanami::View::Rendering::LayoutScope#render
      #
      # @example
      #   # We have an application template (templates/application.html.erb)
      #   # that uses the following line:
      #
      #   <%= render partial: 'shared/sidebar' %>
      class Partial < Template
        protected
        # @api private
        # @since 0.1.0
        def template
          PartialFinder.new(@view.class, @options).find
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
hanami-view-1.3.3 lib/hanami/view/rendering/partial.rb
hanami-view-1.3.2 lib/hanami/view/rendering/partial.rb
hanami-view-1.3.1 lib/hanami/view/rendering/partial.rb
hanami-view-1.3.0 lib/hanami/view/rendering/partial.rb
hanami-view-1.2.1 lib/hanami/view/rendering/partial.rb
hanami-view-1.3.0.beta1 lib/hanami/view/rendering/partial.rb
hanami-view-1.2.0 lib/hanami/view/rendering/partial.rb
hanami-view-1.1.2 lib/hanami/view/rendering/partial.rb
hanami-view-1.2.0.rc2 lib/hanami/view/rendering/partial.rb
hanami-view-1.2.0.rc1 lib/hanami/view/rendering/partial.rb
hanami-view-1.2.0.beta2 lib/hanami/view/rendering/partial.rb
hanami-view-1.2.0.beta1 lib/hanami/view/rendering/partial.rb
hanami-view-1.1.1 lib/hanami/view/rendering/partial.rb
hanami-view-1.1.0 lib/hanami/view/rendering/partial.rb
hanami-view-1.1.0.rc1 lib/hanami/view/rendering/partial.rb
hanami-view-1.1.0.beta3 lib/hanami/view/rendering/partial.rb
hanami-view-1.1.0.beta2 lib/hanami/view/rendering/partial.rb
hanami-view-1.1.0.beta1 lib/hanami/view/rendering/partial.rb
hanami-view-1.0.1 lib/hanami/view/rendering/partial.rb
hanami-view-1.0.0 lib/hanami/view/rendering/partial.rb