diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-03-01 14:10:53 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-03-01 14:10:53 -0800 |
commit | 8fbbdda52634991b047b7567fe3a8ec7c9a6c558 (patch) | |
tree | fefe6fe2dd56df41e2d65fca03a620c3c601b2f1 /actionpack/lib/action_view/helpers/prototype_helper.rb | |
parent | 2060977b767061a42eb8db2d5c3a30d205a94123 (diff) | |
download | rails-8fbbdda52634991b047b7567fe3a8ec7c9a6c558.tar.gz rails-8fbbdda52634991b047b7567fe3a8ec7c9a6c558.tar.bz2 rails-8fbbdda52634991b047b7567fe3a8ec7c9a6c558.zip |
Delegate formats to the controller
Diffstat (limited to 'actionpack/lib/action_view/helpers/prototype_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/prototype_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index 7eb6bceca0..3c4511d931 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -182,10 +182,14 @@ module ActionView def initialize(context, &block) #:nodoc: context._evaluate_assigns_and_ivars @context, @lines = context, [] + old_formats = @context.formats + @context.reset_formats([:js, :html]) if @context include_helpers_from_context @context.with_output_buffer(@lines) do @context.instance_exec(self, &block) end + ensure + @context.reset_formats(old_formats) if @context end private |