No commit activity in last 3 years
No release in over 3 years
Protect web forms form spam.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Guardian

Guardian protects web forms from spam. By adding a hidden input field that counts up, guardian will reject submissions with a duration less than any threshold we deem appropriate (defualt is 2 seconds).

Install

RubyGems.org

$ gem install guardian-forms

from source

$ git clone http://github.com/forrestgrant/guardian
$ cd guardian
$ rake build
$ rake install

add to your Gemfile

gem 'guardian-forms', require: 'guardian'

Usage

Set a before filter in your controller

before_filter :guard

Or

before_filter { |c| c.guard({:threshold => 5})} # 5 seconds

Add guardian to application.js

//= require jquery.guardian

Set Guard specific forms in views

$('form').guard();