retrospring/app/helpers/layouts_helper.rb

10 lines
246 B
Ruby
Raw Normal View History

2020-04-25 17:02:59 +02:00
# frozen_string_literal: true
module LayoutsHelper
def parent_layout(layout)
@view_flow.set(:layout, output_buffer)
2022-01-12 02:24:38 +01:00
output = render(template: "layouts/#{layout}")
2020-04-25 17:02:59 +02:00
self.output_buffer = ActionView::OutputBuffer.new(output)
end
2020-05-09 04:39:09 +02:00
end