Method: ActionComponent::Component::Renderer#apply_html_namespacing
- Defined in:
- lib/actioncomponent/component/renderer.rb
#apply_html_namespacing(raw_html, component_path) ⇒ void
25 26 27 28 |
# File 'lib/actioncomponent/component/renderer.rb', line 25 def apply_html_namespacing(raw_html, component_path) component_id = component_path.gsub(%r{^/}, '').tr('/', '-') "<div class='action-component' data-action-component-id='#{component_id}'>" + raw_html + '</div>'.html_safe end |