Reputation: 5210
How can i make devise paths unavailable. Now i have all forms for registration, authorization and password restore on one page.
Here are my routes
devise_for :users, :controllers => { :passwords => "passwords", :registrations => "registrations" }, :path => 'accounts', :path_names => { :sign_in => 'login', :sign_up => 'new', :sign_out => 'logout'}
so if i enter something like accounts/new
in url, i will get to devise sign up page. Is it possible to make all devise pages unavailable? I should get RoutingError
or MissingTemplate
for example if i enter either of the devise routes.
Upvotes: 0
Views: 127
Reputation: 10898
Just skip the parts you don't want:
devise_for :users,
:controllers => {
:passwords => "passwords",
:registrations => "registrations" },
:path => 'accounts',
:path_names => {
:sign_in => 'login',
:sign_up => 'new',
:sign_out => 'logout'},
:skip => [:passwords, :registrations, :sessions]
Upvotes: 3