Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing init process so it will work in rails 2.1/2.2 as well as the o…

…ld stuff
  • Loading branch information...
commit 5b45794e71d856ad3e60a9d9b79221cbc8a54b73 1 parent b1f9f06
@joho joho authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 init.rb
7 init.rb
@@ -3,6 +3,11 @@
require 'markaby'
require 'markaby/rails'
-ActionView::Base::register_template_handler 'mab', Markaby::Rails::ActionViewTemplateHandler
+if defined? ActionView::Template and ActionView::Template.respond_to? :register_template_handler
+ ActionView::Template
+ ActionView::Base
+end.register_template_handler(:mab, Markaby::Rails::ActionViewTemplateHandler)
ActionController::Base.send :include, Markaby::Rails::ActionControllerHelpers
Please sign in to comment.
Something went wrong with that request. Please try again.