Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/ambethia/recaptcha
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason L Perry committed Jun 22, 2008
2 parents 03b0670 + d450590 commit 4961180
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/recaptcha.rb
Expand Up @@ -51,6 +51,7 @@ def verify_recaptcha(model = nil)
answer, error = recaptcha.body.split.map(&:chomp)
unless answer == 'true'
session[:recaptcha_error] = error
model.valid? if model
model.errors.add_to_base "Captcha response is incorrect, please try again." if model
return false
else
Expand Down
1 change: 1 addition & 0 deletions test/recaptcha_test.rb
@@ -1,4 +1,5 @@
require 'test/unit'
require 'rubygems'
require 'builder'
require File.dirname(__FILE__) + '/../lib/recaptcha'

Expand Down

0 comments on commit 4961180

Please sign in to comment.