Module: RenderWithinLayoutHelper

Included in:
ApplicationHelper
Defined in:
app/helpers/render_within_layout_helper.rb

Instance Method Summary collapse

Instance Method Details

#render(*args, &proc) ⇒ Object


3
4
5
6
7
8
9
10
11
12
13
# File 'app/helpers/render_within_layout_helper.rb', line 3

def render(*args, &proc)
  arg = args.shift
  case arg
  when Hash
    within_layout = arg.delete(:within_layout)
    return view_renderer.render_within_layout(self, within_layout, *args, &proc) if within_layout
  end

  args.unshift(arg)
  super
end