improve section and preview rendering

This commit is contained in:
2023-01-10 21:13:09 +02:00
parent c9afd4f3bc
commit a8f5229935
6 changed files with 9 additions and 12 deletions

View File

@ -97,10 +97,6 @@ module Merged
def button_classes
"mr-3 inline-block rounded-lg px-3 py-2 text-md font-medium border border-gray-500"
end
# section should be hash with at least 'template' key
def find_template(section)
"merged/view/" + section.template
end
end
end

View File

@ -3,6 +3,11 @@ module Merged
include MergedHelper
include PagesHelper
def render_section(section)
template = "merged/view/" + section.template
render( template , section: section)
end
def rows( text )
return 5 if text.blank?
text = text.text unless text.is_a?(String)