验证码无法在 Rails3.1 上运行
我正在开发一个新的 Rails 项目,并使用设备和omniauth recaptcha gem,并且我不断收到此消息“无法到达 recaptch”,
我的控制器代码如下
def create
if session[:omniauth] == nil #OmniAuth
if verify_recaptcha
super
session[:omniauth] = nil unless @user.new_record? #OmniAuth
else
build_resource
clean_up_passwords(resource)
flash[:notice] = "There was an error with the recaptcha code below. Please re-enter the code and click submit."
render_with_scope :new
end
else
super
session[:omniauth] = nil unless @user.new_record? #OmniAuth
end
end
I am working on a new rails project and using device and omniauth recaptcha gem and i keep getting this message "cannot reach recaptch "
my controller code is as follows
def create
if session[:omniauth] == nil #OmniAuth
if verify_recaptcha
super
session[:omniauth] = nil unless @user.new_record? #OmniAuth
else
build_resource
clean_up_passwords(resource)
flash[:notice] = "There was an error with the recaptcha code below. Please re-enter the code and click submit."
render_with_scope :new
end
else
super
session[:omniauth] = nil unless @user.new_record? #OmniAuth
end
end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论