retrospring/app/helpers/layouts_helper.rb
2020-05-09 04:39:09 +02:00

10 lines
281 B
Ruby

# frozen_string_literal: true
module LayoutsHelper
def parent_layout(layout)
@view_flow.set(:layout, output_buffer)
output = render(file: "layouts/#{layout}")
@haml_buffer.buffer.replace output
self.output_buffer = ActionView::OutputBuffer.new(output)
end
end