Sha256: f0c5444aa677891c02ea1c1135536d673849634667077a7346796eb756adb52f
Contents?: true
Size: 674 Bytes
Versions: 2
Compression:
Stored size: 674 Bytes
Contents
# encoding: utf-8 require 'rails' require 'simple_captcha' module SimpleCaptcha class Engine < ::Rails::Engine config.before_initialize do ActiveSupport.on_load :active_record do ActiveRecord::Base.send(:include, SimpleCaptcha::ModelHelpers) end end config.after_initialize do ActionView::Base.send(:include, SimpleCaptcha::ViewHelper) ActionView::Helpers::FormBuilder.send(:include, SimpleCaptcha::FormBuilder) if Object.const_defined?("Formtastic") && Formtastic.const_defined?("Inputs") require "simple_captcha/formtastic" end end config.app_middleware.use SimpleCaptcha::Middleware end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
glebtv-simple_captcha-0.2.0 | lib/simple_captcha/engine.rb |
glebtv-simple_captcha-0.1.6 | lib/simple_captcha/engine.rb |