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