From 3fab196da37ef76cfce040717d4176945212aea8 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 9 Dec 2007 22:11:11 +0000 Subject: Refactor Action View template handlers. Closes #10437. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8341 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/template_handlers/rjs.rb | 10 ++++++++++ 1 file changed, 10 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..300f9890e9 --- /dev/null +++ b/actionpack/lib/action_view/template_handlers/rjs.rb @@ -0,0 +1,10 @@ +module ActionView + module TemplateHandlers + class RJS < TemplateHandler + def compile(template) + "controller.response.content_type ||= Mime::JS\n" + + "update_page do |page|\n#{template}\nend" + end + end + end +end -- cgit v1.2.3