Module: Panmind::Recaptcha::Controller

Defined in:
lib/panmind/recaptcha.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/panmind/recaptcha.rb', line 37

def self.included(base)
  base.instance_eval do
    def require_valid_captcha(options = {})
      if options.delete(:ajax)
        options.update(:unless => :captcha_already_solved?)
      end

      before_filter :validate_recaptcha, options
    end
  end
end