Module: StyleCapsule::Component::ViewTemplateWrapper
- Defined in:
- lib/style_capsule/component.rb
Overview
Module that wraps view_template to add scoped wrapper
Instance Method Summary collapse
Instance Method Details
#view_template ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/style_capsule/component.rb', line 104 def view_template if component_styles? # Render styles first render_capsule_styles # Get wrapper tag tag = self.class.wrapper_tag # Wrap content in scoped element public_send(tag, data_capsule: component_capsule) do super end else # No styles, render normally super end end |