1
我正在使用OmniAuth gem與我的Rails應用程序來允許用戶將他們的Facebook帳戶添加到應用程序,並且我遵循Ryan Bates的教程,但是我繼續得到這個Rails錯誤。OmniAuth操作控制器錯誤
未定義#
局部變量或方法`authentications_url」這是對認證控制器:
class AuthenticationsController < ApplicationController
def index
@authentications = current_user.authentications if current_user
end
def create
auth = request.env["omniauth.auth"]
current_user.authentications.find_or_create_by_provider_and_uid(auth['provider'],auth['uid'])
flash[:notice] = "Authentication successful."
redirect_to authentications_url
end
def destroy
@authentication = current_user.authentications.find(params[:id])
@authentication.destroy
flash[:notice] = "Successfully destroyed authentication."
redirect_to authentications_url
end
末
謝謝!這對我非常有幫助。 –
很高興能夠聽到它,請通過選中對勾來接受答案,如果它回答了您的問題 – iwasrobbed