aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template_handlers/rjs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/template_handlers/rjs.rb')
-rw-r--r--actionpack/lib/action_view/template_handlers/rjs.rb10
1 files changed, 10 insertions, 0 deletions
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