diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-19 17:20:15 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-19 17:20:20 +0100 |
commit | f28d856cece877d1b2f306f54aeb12cce1db1023 (patch) | |
tree | f2ca547068d20558acc80433ef5f667f61f78737 /actionpack/lib/action_view/helpers/prototype_helper.rb | |
parent | fbe35656a95228f760a2cd09676423ba41fe70ab (diff) | |
download | rails-f28d856cece877d1b2f306f54aeb12cce1db1023.tar.gz rails-f28d856cece877d1b2f306f54aeb12cce1db1023.tar.bz2 rails-f28d856cece877d1b2f306f54aeb12cce1db1023.zip |
Improve performance of the rendering stack by freezing formats as a sign that they shouldn't be further modified.
Diffstat (limited to 'actionpack/lib/action_view/helpers/prototype_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/prototype_helper.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index aba2565c67..f53aafa679 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -148,11 +148,9 @@ module ActionView class JavaScriptGenerator #:nodoc: def initialize(context, &block) #:nodoc: @context, @lines = context, [] - @context.update_details(:formats => [:js, :html]) do - include_helpers_from_context - @context.with_output_buffer(@lines) do - @context.instance_exec(self, &block) - end + include_helpers_from_context + @context.with_output_buffer(@lines) do + @context.instance_exec(self, &block) end end |