Retrospring/app/helpers/layouts_helper.rb

10 lines
246 B
Ruby

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