Add parent_layout helper
This commit is contained in:
parent
9ee5811243
commit
8b8a5a1e72
|
@ -0,0 +1,10 @@
|
|||
# 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
|
Loading…
Reference in New Issue