diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-12-04 17:20:51 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-12-04 17:20:51 -0600 |
commit | 148aff2097890a81e874a7c60bae5fa3b2a4d1fd (patch) | |
tree | 63df01cf33c7cc78958e6b192998b0259dda5892 /actionpack/lib/action_view/template_handlers | |
parent | ab211bf592f52fbde7853961030046ea1d387851 (diff) | |
download | rails-148aff2097890a81e874a7c60bae5fa3b2a4d1fd.tar.gz rails-148aff2097890a81e874a7c60bae5fa3b2a4d1fd.tar.bz2 rails-148aff2097890a81e874a7c60bae5fa3b2a4d1fd.zip |
Set template_format to html inside rjs templates so renders within it default to html.
Diffstat (limited to 'actionpack/lib/action_view/template_handlers')
-rw-r--r-- | actionpack/lib/action_view/template_handlers/rjs.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/template_handlers/rjs.rb b/actionpack/lib/action_view/template_handlers/rjs.rb index a700655c9a..41a1fddb47 100644 --- a/actionpack/lib/action_view/template_handlers/rjs.rb +++ b/actionpack/lib/action_view/template_handlers/rjs.rb @@ -4,6 +4,7 @@ module ActionView include Compilable def compile(template) + "@template_format = :html;" + "controller.response.content_type ||= Mime::JS;" + "update_page do |page|;#{template.source}\nend" end |