Permalink
Browse files

compatibility with formtastic 1.2.4

  • Loading branch information...
1 parent 439c989 commit cb6bf8cecd0a2d630ef3436216ad1f7f98554ed6 @vysogot committed Dec 9, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/simple_captcha/engine.rb
@@ -15,7 +15,11 @@ class Engine < ::Rails::Engine
ActionView::Helpers::FormBuilder.send(:include, SimpleCaptcha::FormBuilder)
if Object.const_defined?("Formtastic")
- Formtastic::Helpers::FormHelper.builder = SimpleCaptcha::CustomFormBuilder
+ if Formtastic.const_defined?("Helpers")
+ Formtastic::Helpers::FormHelper.builder = SimpleCaptcha::CustomFormBuilder
+ else
+ Formtastic::SemanticFormHelper.builder = SimpleCaptcha::CustomFormBuilder
+ end
end
end

0 comments on commit cb6bf8c

Please sign in to comment.