Sha256: b20c52f4552a4cc0ea5c3e96c78b207f592a6e0896d53ca449f458a818fdf98f

Contents?: true

Size: 598 Bytes

Versions: 18

Compression:

Stored size: 598 Bytes

Contents

# encoding: utf-8

require 'rails'
require 'simple_captcha'

module SimpleCaptcha
  class Engine < ::Rails::Engine
    unless Object.const_defined?("Mongoid")
      config.before_initialize do
        ActiveSupport.on_load :active_record do
          ActiveRecord::Base.send(:include, SimpleCaptcha::ModelHelpers)
        end
      end
    end

    config.after_initialize do
      ActionView::Base.send(:include, SimpleCaptcha::ViewHelper)
      ActionView::Helpers::FormBuilder.send(:include, SimpleCaptcha::FormBuilder)
    end

    config.app_middleware.use SimpleCaptcha::Middleware
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
glebtv-simple_captcha-0.8.1 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.8.0 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.7.0 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.6.7 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.6.5 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.6.4 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.6.3 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.6.2 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.6.1 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.6.0 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.5.2 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.5.1 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.4.6 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.4.5 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.4.4 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.4.3 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.4.1 lib/simple_captcha/engine.rb
glebtv-simple_captcha-0.3.1 lib/simple_captcha/engine.rb