aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template_handlers/rjs.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-12-09 22:11:11 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-12-09 22:11:11 +0000
commit3fab196da37ef76cfce040717d4176945212aea8 (patch)
treef024c48e7c85a2304d050d652e0ea52966c757d4 /actionpack/lib/action_view/template_handlers/rjs.rb
parentef57b93a82acab5a79620e405af5534cdf0e89c3 (diff)
downloadrails-3fab196da37ef76cfce040717d4176945212aea8.tar.gz
rails-3fab196da37ef76cfce040717d4176945212aea8.tar.bz2
rails-3fab196da37ef76cfce040717d4176945212aea8.zip
Refactor Action View template handlers. Closes #10437.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8341 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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