Permalink
Browse files

Update the README

  • Loading branch information...
1 parent 2fec9a4 commit 4c0eb39655dafa5f078faaa188d19e8d999e409c curtis committed Apr 10, 2010
Showing with 9 additions and 12 deletions.
  1. +9 −12 README.markdown
View
@@ -1,50 +1,47 @@
-# honeypot-captcha
+# Honeypot Captcha
A simple way to add honeypot captchas in your Rails forms.
-## Honeypot Captcha
-
Honeypot captchas work off the premise that you can present different form
fields to a spam bot than you do to a real user. Spam bots will typically try
to fill all fields in a form and will not take into account CSS styles.
We add bogus fields to a form and then check to see if those fields are
submitted with values. If they are, we assume that we encountered a spam bot.
-# Usage
+* [Honeypot Captcha by Phil Haack](http://haacked.com/archive/2007/09/11/honeypot-captcha.aspx)
+* [Stopping spambots with hashes and honeypots](http://nedbatchelder.com/text/stopbots.html)
+
+
+## Usage
I've tried to make it pretty simple to add a honeypot captcha, but I'm open to
any suggestions you may have.
-## form_for
+### form_for
Simply specify that the form has a honeypot in the HTML options hash:
<% form_for Comment.new, :html => { :honeypot => true } do |form| -%>
...
<% end -%>
-## form_tag with block
+### form_tag with block
Simply specify that the form has a honeypot in the options hash:
<% form_tag comments_path, :honeypot => true do -%>
...
<% end -%>
-## form_tag without block
+### form_tag without block
Simply specify that the form has a honeypot in the options hash:
<%= form_tag comments_path, :honeypot => true -%>
...
</form>
-### References
-
-* [Honeypot Captcha by Phil Haack](http://haacked.com/archive/2007/09/11/honeypot-captcha.aspx)
-* [Stopping spambots with hashes and honeypots](http://nedbatchelder.com/text/stopbots.html)
-
## Note on Patches/Pull Requests
* Fork the project.

0 comments on commit 4c0eb39

Please sign in to comment.