Revert "Attempting to remove packs/public (check)"

This reverts commit b2544734c7.
This commit is contained in:
mgabdev
2020-06-15 13:42:19 -04:00
parent 9b79559ace
commit d608fe3214
6 changed files with 341 additions and 19 deletions

View File

@@ -85,6 +85,14 @@ module ApplicationHelper
tag(:meta, content: content, property: property)
end
def react_component(name, props = {}, &block)
if block.nil?
content_tag(:div, nil, data: { component: name.to_s.camelcase, props: Oj.dump(props) })
else
content_tag(:div, data: { component: name.to_s.camelcase, props: Oj.dump(props) }, &block)
end
end
def body_classes
output = (@body_classes || '').split(' ')
output << "theme-#{current_theme.parameterize}"