"Recaptcha" error when upgrading to version 2.1.0

The utility returned a flash warning completely when "Recaptcha" caught the wrong keywords.

But after I updated the version from 1.4.7 to 2.1.0, he always says, "the undefined method is 'render_with_scope' for #"

Does anyone have the same problem? Is this all because of the compatibility of development 2.1.0 with "Recaptcha"?

+4
source share
1 answer

I got the same error

In my register_controller.rb, I change render_with_scope: new to rendering: the new one that worked for my application.

class RegistrationsController < Devise::RegistrationsController ## This controller overwrite the create method of the users Registration controller def create if verify_recaptcha super else build_resource clean_up_passwords(resource) flash.now[:alert] = "There was an error with the recaptcha code below. Please re-enter the code." #render_with_scope :new #dld one render :new end end end 
+9
source

Source: https://habr.com/ru/post/1396243/


All Articles