更新设计版本2.1.0时"Recaptcha"上的错误

MKK*_*MKK 4 recaptcha devise ruby-on-rails-3.2

当"Recaptcha"发现错误的关键字时,设计完全返回闪光警报.

但在我将设计版本从1.4.7更新到2.1.0之后,它总是说"未定义的方法`render_with_scope'代表#"

有没有人有同样的问题?这是因为设计2.1.0与"Recaptcha"的兼容性吗?

bul*_*ric 9

我得到了同样的错误

在我的registration_controller.rb中,我更改了 render_with_scope:new to render:new ,适用于我的应用程序.

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
Run Code Online (Sandbox Code Playgroud)