recaptcha不能在rails3.1上工作

时间:2011-07-17 22:01:39

标签: ruby-on-rails-3 devise recaptcha omniauth

我正在开发一个新的rails项目并使用设备和omniauth recaptcha gem并且我不断收到此消息"无法达到重新捕获"

我的控制器代码如下

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

0 个答案:

没有答案
相关问题