Class: TemplateComponent

Inherits:
Component show all
Defined in:
app/components/template_component.rb

Overview

Template - a plain <template> element.

Usage:

Template { text "content" }
Template(data: { nested_form_target: "template" }) { text "..." }

Constant Summary

Constants inherited from Component

Component::HTML_OPTIONS

Instance Method Summary collapse

Methods inherited from Component

default, #initialize, #render_in, slot

Constructor Details

This class inherits a constructor from Component

Instance Method Details

#to_sObject



10
11
12
# File 'app/components/template_component.rb', line 10

def to_s
  tag.template(**merge_html_options) { @content }
end