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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s