Module: ProtectViaHoneypots::InstanceMethods

Defined in:
lib/protect_via_honeypots.rb

Instance Method Summary collapse

Instance Method Details

#verified_request?Boolean



25
26
27
# File 'lib/protect_via_honeypots.rb', line 25

def verified_request?
   ProtectViaHoneypots::HONEYPOT_TAGS.all?{ |x| params[x].blank? }
end

#verify_honeypotsObject



21
22
23
# File 'lib/protect_via_honeypots.rb', line 21

def verify_honeypots
  verified_request? || raise(ActionController::InvalidHoneyPots)
end