public
Description: ReCaptcha helpers for Rails apps
Home | Edit | New

Another way of calling verify_recaptcha

Just FYI. I had trouble getting the plugin to work directly with the constants RECAPTCHA_PUBLIC_KEY and RECAPTCHA_PRIVATE_KEY that were in my environment.rb file (maybe because I was on windows?). So had to write my verify_captcha call like this


     if request.post? and not verify_recaptcha(:private_key => RECAPTCHA_PRIVATE_KEY)
		flash[:error] = "The words do not match the ones in the recaptcha image!"
		return
     end

Also had to do the same with the recaptcha_tags call


<%= recaptcha_tags(:public_key => RECAPTCHA_PUBLIC_KEY) %>

Last edited by concept47, Wed Feb 04 05:09:30 -0800 2009
Home | Edit | New
Versions: