コントローラーの「破壊」を正しく機能させようとしていますが、正しいセットアップはどうあるべきか疑問に思っています。
私が得ているエラーは
ActiveRecord::RecordNotFound in AuthenticationsController#destroy
Couldn't find Authentication without an ID
私のコントローラーは次のようになります
class AuthenticationsController < InheritedResources::Base
def destroy
@authentication = current_user.authentications.find(params[:id])
@authentication.destroy
redirect_to(:back)
end
データベース テーブル
create_table "authentications", :force => true do |t|
t.integer "user_id"
t.string "provider"
t.string "uid"
t.string "secret"
t.string "token"
end
:user_id などの他のパラメーターを試しました。ユーザーにトークンを破棄させるにはどうすればよいですか? (後で再認証するオプション付き)