diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-21 14:22:07 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-21 14:34:56 -0700 |
commit | e693f45e155a81b6c337b8766870b56716a05105 (patch) | |
tree | 176d94bdc8aa6e072666f1a1ef9383ff809a18df /actionpack/lib/action_view/template/handlers/rjs.rb | |
parent | 386ff66e5ed4fbe1e060610d4226a4eb22dca766 (diff) | |
download | rails-e693f45e155a81b6c337b8766870b56716a05105.tar.gz rails-e693f45e155a81b6c337b8766870b56716a05105.tar.bz2 rails-e693f45e155a81b6c337b8766870b56716a05105.zip |
Remove some response content type concepts from ActionView
Diffstat (limited to 'actionpack/lib/action_view/template/handlers/rjs.rb')
-rw-r--r-- | actionpack/lib/action_view/template/handlers/rjs.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |