diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-15 18:42:22 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-07-15 18:42:22 -0700 |
commit | ecc054352512cac8c0895c78c5f3d043046dcfec (patch) | |
tree | f912cb8d90909eb829a7f7aec9f0d021bcad2790 /actionpack/lib/action_view/helpers/prototype_helper.rb | |
parent | fbef982e4b906b879240a35a1ecff447007da6b2 (diff) | |
download | rails-ecc054352512cac8c0895c78c5f3d043046dcfec.tar.gz rails-ecc054352512cac8c0895c78c5f3d043046dcfec.tar.bz2 rails-ecc054352512cac8c0895c78c5f3d043046dcfec.zip |
JavaScriptGenerator should only sets output_buffer for the duration of the update block
Diffstat (limited to 'actionpack/lib/action_view/helpers/prototype_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/prototype_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index edb43844a4..8c8c22dd4a 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -580,9 +580,10 @@ module ActionView class JavaScriptGenerator #:nodoc: def initialize(context, &block) #:nodoc: @context, @lines = context, [] - @context.output_buffer = @lines if @context include_helpers_from_context - @context.instance_exec(self, &block) + @context.with_output_buffer(@lines) do + @context.instance_exec(self, &block) + end end private |