GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of ambethia/recaptcha
Description: ReCaptcha helpers for Rails apps
Homepage: http://ambethia.com/recaptcha
Clone URL: git://github.com/andrew/recaptcha.git
added check to see if model is valid before adding error to base, to 
retain all validation errors without extra controller code
andrew (author)
Wed May 14 17:12:18 -0700 2008
commit  02e881436881a40cacb1e92c0dc61183b6f47242
tree    ee7cb3871c60cb00ad4da2ca0c42e955d6590197
parent  3a54d9f3e83d9490e7521a73628fd42297eece76
...
51
52
53
 
54
55
56
...
51
52
53
54
55
56
57
0
@@ -51,6 +51,7 @@ module Ambethia
0
           answer, error = recaptcha.body.split.map(&:chomp)
0
           unless answer == 'true'
0
             session[:recaptcha_error] = error
0
+ model.valid? if model
0
             model.errors.add_to_base "Captcha response is incorrect, please try again." if model
0
             return false
0
           else

Comments

    No one has commented yet.