Sha256: 9770e7180431d30633a694111df7b65419435dad904c10f48456ac031076601b

Contents?: true

Size: 718 Bytes

Versions: 9

Compression:

Stored size: 718 Bytes

Contents

require 'lotus/view/rendering/partial_finder'

module Lotus
  module View
    module Rendering
      # Rendering partial
      #
      # It's used when a template wants to render a partial.
      #
      # @api private
      # @since 0.1.0
      #
      # @see Lotus::View::Rendering::Template
      # @see Lotus::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
        def template
          PartialFinder.new(@view.class, @options).find
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lotus-view-0.5.0 lib/lotus/view/rendering/partial.rb
lotus-view-0.4.4 lib/lotus/view/rendering/partial.rb
lotus-view-0.4.3 lib/lotus/view/rendering/partial.rb
lotus-view-0.4.2 lib/lotus/view/rendering/partial.rb
lotus-view-0.4.1 lib/lotus/view/rendering/partial.rb
lotus-view-0.4.0 lib/lotus/view/rendering/partial.rb
lotus-view-0.3.0 lib/lotus/view/rendering/partial.rb
lotus-view-0.2.0 lib/lotus/view/rendering/partial.rb
lotus-view-0.1.0 lib/lotus/view/rendering/partial.rb