diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-06-05 16:51:49 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-06-05 16:51:49 +0000 |
commit | b83efadb32fe55ba7a7d23d650a8adc1a351eab7 (patch) | |
tree | a92fd4097bcbf43479ce0e3ab196be4c6398371b /actionpack/lib | |
parent | ed1ed9ed97f7d30ba8221079365634aa9c4bf24c (diff) | |
download | rails-b83efadb32fe55ba7a7d23d650a8adc1a351eab7.tar.gz rails-b83efadb32fe55ba7a7d23d650a8adc1a351eab7.tar.bz2 rails-b83efadb32fe55ba7a7d23d650a8adc1a351eab7.zip |
Assume html format when rendering partials in RJS. #8076 [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6950 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-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 33e52bfa6e..d1f992486f 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -631,9 +631,13 @@ module ActionView end def render(*options_for_render) + old_format = @context && @context.template_format + @context.template_format = :html if @context Hash === options_for_render.first ? @context.render(*options_for_render) : options_for_render.first.to_s + ensure + @context.template_format = old_format if @context end def javascript_object_for(object) |