diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-02 13:32:58 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-02 21:32:50 -0700 |
commit | 0bdb7d353b4ac6f5470884360f9a480a16bd709c (patch) | |
tree | 53d266015cf696c280b9ba37995c9d1f6bd02358 /actionpack/lib/action_view/base.rb | |
parent | 933697a5fc5f4c56c4fd7fbbd31b8973df9c1054 (diff) | |
download | rails-0bdb7d353b4ac6f5470884360f9a480a16bd709c.tar.gz rails-0bdb7d353b4ac6f5470884360f9a480a16bd709c.tar.bz2 rails-0bdb7d353b4ac6f5470884360f9a480a16bd709c.zip |
Work with @output_buffer instead of _erbout
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 5fae2d4dd6..7a603f150f 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -156,10 +156,12 @@ module ActionView #:nodoc: attr_reader :finder attr_accessor :base_path, :assigns, :template_extension, :first_render attr_accessor :controller - + attr_writer :template_format attr_accessor :current_render_extension + attr_accessor :output_buffer + # Specify trim mode for the ERB compiler. Defaults to '-'. # See ERb documentation for suitable values. @@erb_trim_mode = '-' @@ -313,9 +315,10 @@ If you are rendering a subtemplate, you must now use controller-like partial syn private def wrap_content_for_layout(content) - original_content_for_layout = @content_for_layout - @content_for_layout = content - returning(yield) { @content_for_layout = original_content_for_layout } + original_content_for_layout, @content_for_layout = @content_for_layout, content + yield + ensure + @content_for_layout = original_content_for_layout end # Evaluate the local assigns and pushes them to the view. |