Skip to content

forrestgrant/guardian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

Gem for protecting web forms form spam.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages