Flowdock
method

_render_with_layout

Importance_0
v2.2.1 - Show latest stable - 0 notes - Class: ActionView::Base
_render_with_layout(options, local_assigns, &block) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_view/base.rb, line 348
      def _render_with_layout(options, local_assigns, &block) #:nodoc:
        partial_layout = options.delete(:layout)

        if block_given?
          begin
            @_proc_for_layout = block
            concat(render(options.merge(:partial => partial_layout)))
          ensure
            @_proc_for_layout = nil
          end
        else
          begin
            original_content_for_layout = @content_for_layout if defined?(@content_for_layout)
            @content_for_layout = render(options)

            if (options[:inline] || options[:file] || options[:text])
              @cached_content_for_layout = @content_for_layout
              render(:file => partial_layout, :locals => local_assigns)
            else
              render(options.merge(:partial => partial_layout))
            end
          ensure
            @content_for_layout = original_content_for_layout
          end
        end
      end
Register or log in to add new notes.