Skip to content

Commit

Permalink
Skip generation of default Devise routes for admin
Browse files Browse the repository at this point in the history
This commit updates the backend route configuration for Devise, to skip
generating the default route set. We already specify these routes with
much more convenient names (`/admin/login` vs `/user/spree_user/sign_in`).
  • Loading branch information
stewart committed Oct 4, 2017
1 parent 6323b1a commit fc1504d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@
devise_for(:spree_user, {
class_name: 'Spree::User',
singular: :spree_user,
skip: :all,
path_names: { sign_out: 'logout' },
controllers: {
sessions: 'spree/admin/user_sessions',
passwords: 'spree/admin/user_passwords'
},
skip: [:unlocks, :omniauth_callbacks, :registrations],
path_names: { sign_out: 'logout' },
path_prefix: :user
})

devise_scope :spree_user do
Expand Down

0 comments on commit fc1504d

Please sign in to comment.