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

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s