ruby - Rails, Devise remove registration of specific model -
i have 2 models admin
, partner
. both of them created devise. want remove registration admin
wrote in routes:
devise_for :admins, skip: :registrations
however when try run page admins
login page appears. throws me error:
undefined method `new_admin_registration_path' #<actiondispatch::routing::routesproxy:0x0000000d4d9650>
i know before there registration link removed registration path admins
, tries create link registration path.
there this tutorial of how remove registration forms, want have registration partners
while admins
not have.
question how remove registration links admins
while keeping in partners
??
you generate devise views admins:
rails generate devise:views admins
this create set of views in views/admins, including partial named "_links.erb.html". can remove unneeded link one, , should not impact partners views.
Comments
Post a Comment