diff --git a/lib/honeypot-captcha.rb b/lib/honeypot-captcha.rb index 4b74cf4..5534542 100644 --- a/lib/honeypot-captcha.rb +++ b/lib/honeypot-captcha.rb @@ -32,4 +32,8 @@ def self.included(base) # :nodoc: end end -ActionController::Base.send(:include, HoneypotCaptcha::SpamProtection) if defined?(ActionController::Base) +ActiveSupport.on_load(:action_controller) do + if defined?(ActionController::Base) + ActionController::Base.send(:include, HoneypotCaptcha::SpamProtection) + end +end