From 148aff2097890a81e874a7c60bae5fa3b2a4d1fd Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 4 Dec 2008 17:20:51 -0600 Subject: Set template_format to html inside rjs templates so renders within it default to html. --- actionpack/lib/action_view/template_handlers/rjs.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_view/template_handlers/rjs.rb') 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 -- cgit v1.2.3