merged/app/helpers/merged/sections_helper.rb
2022-12-10 19:22:44 +02:00

26 lines
587 B
Ruby

module Merged
module SectionsHelper
include ViewHelper #for previews
def section_form(options)
url = section_url( @section.id)
form_tag( url , {method: :patch}) do
yield
end
end
def image_root
Image.image_root
end
#image tag for the preview, passing options through
def section_preview(section , options)
image_tag("merged/section_preview/#{section.template}" , options)
end
def card_preview(section , options)
image_tag("merged/card_preview/#{section.card_template}" , options)
end
end
end