From eb9af20b7cc0e374277cf330bdd404f9daab28ec Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Thu, 22 Jan 2009 16:18:10 -0600 Subject: Begin unifying the interface between ActionController and ActionView --- actionpack/lib/action_view/template/handlers/rjs.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 actionpack/lib/action_view/template/handlers/rjs.rb (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 new file mode 100644 index 0000000000..802a79b3fc --- /dev/null +++ b/actionpack/lib/action_view/template/handlers/rjs.rb @@ -0,0 +1,13 @@ +module ActionView + module TemplateHandlers + class RJS < TemplateHandler + include Compilable + + def compile(template) + "@formats = [:html];" + + "controller.response.content_type ||= Mime::JS;" + + "update_page do |page|;#{template.source}\nend" + end + end + end +end -- cgit v1.2.3