File: render_component_helper.rb

package info (click to toggle)
ruby-view-component 2.74.1-1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 3,156 kB
  • sloc: ruby: 6,731; sh: 163; javascript: 10; makefile: 4
file content (10 lines) | stat: -rw-r--r-- 295 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

module ViewComponent
  module RenderComponentHelper # :nodoc:
    def render_component(component, &block)
      component.set_original_view_context(__vc_original_view_context) if is_a?(ViewComponent::Base)
      component.render_in(self, &block)
    end
  end
end