阅读背景:

关于编写控制器动作测试的问题

来源:互联网 

My Sessions Controller

我的会话控制器

def create
    auth = request.env["omniauth.auth"]
    person=Person.find_by_provider_and_uid(auth.provider,auth.uid) || Person.create_with_omniauth(auth)
    session[:user_id] = person.id
    redirect_to root_path
  end

  def failure
    redirect_to signin_path , alert: "Authentication failed, please try again." 
  end
def create
 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: