如何将 simple-captcha2 与设计集成?我浏览了其他问题,但不满意。
问问题
365 次
1 回答
0
我只是添加registrations_controller.rb
class RegistrationsController < Devise::RegistrationsController
# POST /resource
def create
if simple_captcha_valid?
super
else
build_resource(sign_up_params)
clean_up_passwords(resource)
flash.now[:alert] = "There was an error with the Captcha code below. Please re-enter the code."
render :new
end
end
end
它达到了我的目的..
于 2014-07-20T14:13:56.780 回答