improve section and preview rendering
This commit is contained in:
@ -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
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user