diff options
author | José Valim <jose.valim@gmail.com> | 2010-10-10 01:14:50 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-10-10 01:14:50 +0200 |
commit | c7408a0e40545558872efb4129fe4bf097c9ce2f (patch) | |
tree | 885530615b24077435f5e2c920c906f89117f42f /actionpack/lib/action_view/template/handler.rb | |
parent | 64c7f7e39244129e9330afed82da8a7ffeb948b3 (diff) | |
download | rails-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/handler.rb')
-rw-r--r-- | actionpack/lib/action_view/template/handler.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template/handler.rb b/actionpack/lib/action_view/template/handler.rb index c6a1bc6235..0a9d299807 100644 --- a/actionpack/lib/action_view/template/handler.rb +++ b/actionpack/lib/action_view/template/handler.rb @@ -1,4 +1,4 @@ -require "action_dispatch/http/mime_type" +require 'action_dispatch/http/mime_type' require 'active_support/core_ext/class/attribute' # Legacy TemplateHandler stub @@ -7,6 +7,8 @@ module ActionView module Handlers #:nodoc: module Compilable def self.included(base) + ActiveSupport::Deprecation.warn "Including Compilable in your template handler is deprecated. " << + "All the API your template handler needs to implement is to respond to #call." base.extend(ClassMethods) end @@ -26,6 +28,12 @@ module ActionView class_attribute :default_format self.default_format = Mime::HTML + def self.inherited(base) + ActiveSupport::Deprecation.warn "Inheriting from ActionView::Template::Handler is deprecated. " << + "All the API your template handler needs to implement is to respond to #call." + super + end + def self.call(template) raise "Need to implement #{self.class.name}#call(template)" end |