0
내 응용 프로그램에는 사용자, 고용주 및 감사인의 세 가지 모델이 있습니다. 세 가지를 모두 만들고 사용자와 고용주 모두로 로그인 할 수 있지만 Devise는 감사자를 위해 새 세션을 만들지 않습니다. 다른 모델에 같은 모양 요식Devise 401 세션 새 기능이 작동하지 않음 (여러 모델, 두 가지가 잘 작동, 하나는 작동하지 않음)
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me
:
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"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
Completed 401 Unauthorized in 0ms
나는 모델을 만들기 위해 고안 생성기를 사용했다.
경로 괜찮을 것 같다 : I의 의견 또는 고안의 세션 컨트롤러에 아무것도 변경되지 않은
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" }
. 어떤 아이디어라도 환영합니다.