From e693f45e155a81b6c337b8766870b56716a05105 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Thu, 21 May 2009 14:22:07 -0700 Subject: Remove some response content type concepts from ActionView --- actionpack/lib/action_view/template/handlers/rjs.rb | 6 ++++++ 1 file changed, 6 insertions(+) (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 802a79b3fc..a36744c2b7 100644 --- a/actionpack/lib/action_view/template/handlers/rjs.rb +++ b/actionpack/lib/action_view/template/handlers/rjs.rb @@ -3,11 +3,17 @@ module ActionView class RJS < TemplateHandler include Compilable + self.default_format = Mime::JS + def compile(template) "@formats = [:html];" + "controller.response.content_type ||= Mime::JS;" + "update_page do |page|;#{template.source}\nend" end + + def default_format + Mime::JS + end end end end -- cgit v1.2.3