aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template/handlers/rjs.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-10-10 01:14:50 +0200
committerJosé Valim <jose.valim@gmail.com>2010-10-10 01:14:50 +0200
commitc7408a0e40545558872efb4129fe4bf097c9ce2f (patch)
tree885530615b24077435f5e2c920c906f89117f42f /actionpack/lib/action_view/template/handlers/rjs.rb
parent64c7f7e39244129e9330afed82da8a7ffeb948b3 (diff)
downloadrails-c7408a0e40545558872efb4129fe4bf097c9ce2f.tar.gz
rails-c7408a0e40545558872efb4129fe4bf097c9ce2f.tar.bz2
rails-c7408a0e40545558872efb4129fe4bf097c9ce2f.zip
Deprecate old template handler API. Remove old handlers.
Diffstat (limited to 'actionpack/lib/action_view/template/handlers/rjs.rb')
-rw-r--r--actionpack/lib/action_view/template/handlers/rjs.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/template/handlers/rjs.rb b/actionpack/lib/action_view/template/handlers/rjs.rb
index 128be5077c..9d71059134 100644
--- a/actionpack/lib/action_view/template/handlers/rjs.rb
+++ b/actionpack/lib/action_view/template/handlers/rjs.rb
@@ -1,17 +1,13 @@
module ActionView
module Template::Handlers
- class RJS < Template::Handler
- include Compilable
-
+ class RJS
+ # Default format used by RJS.
+ class_attribute :default_format
self.default_format = Mime::JS
- def compile(template)
+ def call(template)
"update_page do |page|;#{template.source}\nend"
end
-
- def default_format
- Mime::JS
- end
end
end
end