Add attachment list fallback to public pages (#9780)
* Add attachment list fallback to public pages Fixes #6714 * Refactor attachments lists
This commit is contained in:
parent
9ee9cb549b
commit
4fb94c758e
5 changed files with 28 additions and 6 deletions
|
@ -69,8 +69,12 @@ module ApplicationHelper
|
|||
tag(:meta, content: content, property: property)
|
||||
end
|
||||
|
||||
def react_component(name, props = {})
|
||||
content_tag(:div, nil, data: { component: name.to_s.camelcase, props: Oj.dump(props) })
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue