我试图为" jobseeker"添加第二个模型,当我尝试去/ jobseekers / sign_up时我遇到路线问题,当尝试其他方式时它使用设计/注册/新视图,这对我来说不合适,因为我没有使用相同的字段。
我阅读并尝试了不同的方法,但仍然没有工作。
我只想使用求职者的控制器以及求职者的自定义视图
我跟着https://github.com/plataformatec/devise#configuring-controllers来制作它。
如果你能告诉我问题出在哪里,那将是非常好的。感谢。
对于我使用过的路线:
1) devise_for :jobseekers, controllers: { sessions: "jobseekers/sessions", registrations: "jobseekers/registration" }
---> routes errors
2) devise_scope :jobseekers do
get "sign_in", to: "jobseekers/sessions#new"
get "sign_up", to: "jobseekers/registration#new"
end --> routes routes

如此生成的新控制器:
app/controllers/jobseekers/confirmations_controller.rb
app/controllers/jobseekers/omniauth_callbacks_controller.rb
app/controllers/jobseekers/passwords_controller.rb
app/controllers/jobseekers/registrations_controller.rb
app/controllers/jobseekers/sessions_controller.rb
app/controllers/jobseekers/unlocks_controller.rb

我还生成了如下视图
app/views/jobseekers/confirmations/new.html.erb
app/views/jobseekers/mailer/confirmation_instructions.html.erb
app/views/jobseekers/mailer/reset_password_instructions.html.erb
app/views/jobseekers/mailer/unlock_instructions.html.erb
app/views/jobseekers/passwords/edit.html.erb
app/views/jobseekers/passwords/new.html.erb
app/views/jobseekers/registrations/edit.html.erb
app/views/jobseekers/registrations/new.html.erb
app/views/jobseekers/sessions/new.html.erb
app/views/jobseekers/shared/_links.html.erb
app/views/jobseekers/unlocks/new.html.erb