0
我按照屏幕铸形瑞安贝茨railscast和除非我改变我的方法,例如如下每一件事情是工作的罚款:Omniauth问题3.1.0
从
def create
omniauth = request.env["omniauth.auth"]
current_user.authentications.create(:provider => omniauth['provider'], :uid => omniauth["uid"])
flash[:notice] = "Authentication successful"
rescue Exception => e
# Just spit out the error message and a backtrace.
render :text => "<html><body><pre>" + e.to_s + "</pre><hr /><pre>" + e.backtrace.join("\n") + "</pre></body></html>"
end
到
def create
omniauth = request.env["omniauth.auth"]
current_user.authentications.create(omniauth['provider'], omniauth["uid"])
flash[:notice] = "Authentication successful"
rescue Exception => e
# Just spit out the error message and a backtrace.
render :text => "<html><body><pre>" + e.to_s + "</pre><hr /><pre>" + e.backtrace.join("\n") + "</pre></body></html>"
end
我不断收到未定义的方法stringify_keys' for "twitter":String
但每件事情都很好地工作的第一种方式。任何想法在这里
哇,请我怎么能去这个 – Uchenna
这是相同的方式,它是在做railscasts插曲。或者我错过了什么 – Uchenna
我很抱歉,我不知道你在做什么。第一种方法有什么问题? – Gazler