public
Description: Creates a reverse captcha for any model.
Homepage:
Clone URL: git://github.com/stevenbristol/less-reverse-captcha.git
name age message
file LICENSE Sun Oct 05 13:18:41 -0700 2008 creating less reverse captcha [stevenbristol]
file README Sun Oct 05 13:18:41 -0700 2008 creating less reverse captcha [stevenbristol]
file Rakefile Sun Oct 05 13:18:41 -0700 2008 creating less reverse captcha [stevenbristol]
file init.rb Sun Oct 05 13:18:41 -0700 2008 creating less reverse captcha [stevenbristol]
file install.rb Sun Oct 05 13:18:41 -0700 2008 creating less reverse captcha [stevenbristol]
directory lib/ Sun Oct 05 13:18:41 -0700 2008 creating less reverse captcha [stevenbristol]
directory tasks/ Sun Oct 05 13:18:41 -0700 2008 creating less reverse captcha [stevenbristol]
directory test/ Sun Oct 05 13:18:41 -0700 2008 creating less reverse captcha [stevenbristol]
README
LessReverseCaptcha
===========

The Less Reverse Capchta creates a captcha that is invisible to the user. Rather than force the user to prove they are a 
human, we are allowing bots to prove they are bots. The captcha field is hidden and so humans will leave it blank. Bots 
do not realize it is hidden so they will fill out the field. The validator checks to see if the field is blank, if it is 
it allows the save, if not, it does not allow it.
To use less reverse captcha simply put 'validates_captcha' in the model and use the 'captcha_field' helper in your view.




new.html.erb


<%= flash[:notice] %>
<%= error_messages_for :comment %>

<% form_for @comment do |form| %>
  
  <%= form.text_area :comment %>
  <%= less_reverse_captcha_field :comment %>
  
  <%= submit_tag %>
<% end %>



comments_controller.rb
def create
  @comment = Comment.create params[:comment]
  if @comment.new_record?
    render :action=>'index'
  else
    redirect_to comments_path
  end
end




comment.rb

class Comment < ActiveRecord::Base
  
  validates_less_reverse_captcha