]> git.wincent.com - wikitext.git/commitdiff
Avoid another Rails 3.1 deprecation warning
authorWincent Colaiuta <win@wincent.com>
Sat, 28 May 2011 05:48:26 +0000 (22:48 -0700)
committerWincent Colaiuta <win@wincent.com>
Sat, 28 May 2011 05:48:26 +0000 (22:48 -0700)
Specifically:

  DEPRECATION WARNING: Including Compilable in your template handler is
  deprecated. Since Rails 3, all the API your template handler needs to
  implement is to respond to #call.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
lib/wikitext/rails_template_handler.rb

index f516ecfbe0e79b852bce5320aa8ddf6422e04c07..783ea429f841414415fb5b80f8f0950cbf5c4f6c 100644 (file)
@@ -28,9 +28,7 @@ module ActionView
   class Template
     module Handlers
       class Wikitext
-        include Compilable
-
-        def compile template
+        def self.call template
           "'" + template.source.w.gsub("'", "\\\\'") + "'"
         end
       end # class Wikitext