Sha256: 1e76507c77f2929d50904df6ae828ffb846831290632242e14abf156435a9b5a
Contents?: true
Size: 629 Bytes
Versions: 7
Compression:
Stored size: 629 Bytes
Contents
# encoding: utf-8 require 'rails' require 'simple_captcha' module SimpleCaptcha class Railtie < ::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::SemanticFormHelper.builder = SimpleCaptcha::CustomFormBuilder end end end end
Version data entries
7 entries across 7 versions & 3 rubygems