]> git.wincent.com - wikitext.git/commitdiff
Drop code that only existed to support Rails 2
authorWincent Colaiuta <win@wincent.com>
Tue, 14 Jan 2014 01:44:04 +0000 (20:44 -0500)
committerWincent Colaiuta <win@wincent.com>
Tue, 14 Jan 2014 01:44:04 +0000 (20:44 -0500)
We dropped support for Rails 2 back in the 3.0b release, so there is no
need to keep this crud lying around.

If somebody attempts to use the Gem with Rails 2, it should explode with
a NoMethodError when we call ActiveSupport.on_load(:action_view), which
seems fair enough.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
ext/wikitext/wikitext.c

index 404fac2ff1bcc7632830c802baec2b4728b84340..af026aa0fedea74226b55cdbbde79549b4c58cde 100644 (file)
@@ -110,15 +110,9 @@ void Init_wikitext()
         rb_require("wikitext/nil_class");
         rb_require("wikitext/string");
 
-        // now check for Rails version
         VALUE active_support = rb_const_get(rb_cObject,
             rb_intern("ActiveSupport"));
-        if (rb_respond_to(active_support, rb_intern("on_load")))
-            // running under Rails 3
-            rb_iterate(wikitext_block_forwarder, active_support,
-                wikitext_on_load_block, Qnil);
-        else
-            // running under Rails 2
-            rb_require("wikitext/rails_template_handler");
+        rb_iterate(wikitext_block_forwarder, active_support,
+            wikitext_on_load_block, Qnil);
     }
 }