Catch Robots with Honeypot Plugin

Adding honeypots is simple, just add some field, hide them and then check on there values after submitting.

But this plugin makes it simple and DRY.

Install

script/plugin install git://github.com/grosser/honeypot.git

Usage

Controller:
  before_filter :check_honeypots, :only => [:create]

  OR - if the default render new + flash[:error] is not what you want

  def create
    render :action=>'error' and return unless honeypot_untouched?
    ...
  end

Forms:
  =honeypot

2 thoughts on “Catch Robots with Honeypot Plugin

Leave a comment