views:

68

answers:

0

Hi, I am using recaptcha in my RoR application, i have my public and private keys defined in the environment.rb. Whenever i try to validate the recaptcha value using verify_recaptcha it always returns false

i went inside the code of verify_recaptcha and found out that i always get following error "input error : error parsing input captcha value" for recaptcha.body in the line -- " answer, error = recaptcha.body.split.map { |s| s.chomp } "

couldn't find the reason why Anyone have an idea why the error could be

Controller

def create_account
  @user = User.new(params[:user])
  if verify_recaptcha(:model => @user)
    user_info.update_attribute(:user_id, @user.id)
     @user.initialize_notification_preference
     if @user.save
      @user.activate!
      redirect_to :controller => 'home'
    end
   end
  end 

Views

<%= recaptcha_tags -%>