0

私のアプリケーションには、ユーザー、雇用者、監査人の3つのデバイスモデルがあります。3つすべてを作成し、ユーザーと雇用者の両方でログインできますが、Deviseは監査人用の新しいセッションを作成しません。

Started POST "/auditors/sign_in" for 127.0.0.1 at 2012-10-05 01:41:44 +0200
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"vg1hGiEx3Ly1YRVX1XaWyEkz85lJU/5Ap/TcVo8+xWo=", "auditor"=>{"email"=>"auditor5@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
Completed 401 Unauthorized in 0ms

deviseジェネレーターを使用してモデルを作成しました。

   # Setup accessible (or protected) attributes for your model
   attr_accessible :email, :password, :password_confirmation, :remember_me

..他のモデルでも同じように見えます。

ルートは問題ないようです:

devise_for :auditors
devise_for :employers
resources :employers, :only => [:show, :edit, :index, :update, :credit]

devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
devise_for :users
devise_for :users, :controllers => { :registrations => "registrations" }

ビューまたはデバイスのセッションコントローラでは何も変更していません。どんなアイデアでも大歓迎です。

4

1 に答える 1

2

Yesterday, I tried clearing my browser cache and still no success. Posted question on SA. This morning, I simply started my computer, openend the browser and registration and sign_in worked. Not sure why.

Suggestion: Try restarting server, cleaning cookies, open/close browser.

于 2012-10-05T09:30:47.533 に答える