lib/simple_captcha.rb in glebtv-simple_captcha-0.2.0 vs lib/simple_captcha.rb in glebtv-simple_captcha-0.2.1
- old
+ new
@@ -4,17 +4,19 @@
autoload :Utils, 'simple_captcha/utils'
autoload :ImageHelpers, 'simple_captcha/image'
autoload :ViewHelper, 'simple_captcha/view'
autoload :ControllerHelpers, 'simple_captcha/controller'
- autoload :ModelHelpers, 'simple_captcha/active_record'
autoload :FormBuilder, 'simple_captcha/form_builder'
autoload :CustomFormBuilder, 'simple_captcha/formtastic'
if defined?(Mongoid)
+ require 'simple_captcha/mongoid'
+ autoload :ModelHelpers, 'simple_captcha/mongoid'
autoload :SimpleCaptchaData, 'simple_captcha/simple_captcha_data_mongoid'
else
+ autoload :ModelHelpers, 'simple_captcha/active_record'
autoload :SimpleCaptchaData, 'simple_captcha/simple_captcha_data_ar'
end
autoload :Middleware, 'simple_captcha/middleware'
mattr_accessor :image_size