|
10 | 10 | passwords: 'spree/user_passwords', |
11 | 11 | confirmations: 'spree/user_confirmations' |
12 | 12 | }, |
13 | | - skip: [:unlocks, :omniauth_callbacks], |
14 | | - path_names: { sign_out: 'logout' }, |
15 | | - path_prefix: :user, |
16 | | - router_name: :spree |
| 13 | + skip: :all, |
17 | 14 | }) |
18 | 15 |
|
19 | 16 | resources :users, only: [:edit, :update] |
20 | 17 |
|
21 | 18 | devise_scope :spree_user do |
| 19 | + # Legacy devise generated paths |
| 20 | + # These are deprecated but we still want to support the incoming routes, |
| 21 | + # in order to give existing stores an upgrade path. |
| 22 | + get 'user/spree_user/sign_in', to: 'user_sessions#new', as: nil |
| 23 | + post 'user/spree_user/sign_in', to: 'user_sessions#create', as: nil |
| 24 | + match 'user/spree_user/logout', to: 'user_sessions#destroy', via: Devise.sign_out_via, as: nil |
| 25 | + get 'user/spree_user/password/new', to: 'user_passwords#new', as: nil |
| 26 | + get 'user/spree_user/password/edit', to: 'user_passwords#edit', as: nil |
| 27 | + patch 'user/spree_user/password', to: 'user_passwords#update', as: nil |
| 28 | + put 'user/spree_user/password', to: 'user_passwords#update', as: nil |
| 29 | + post 'user/spree_user/password', to: 'user_passwords#create', as: nil |
| 30 | + get 'user/spree_user/cancel', to: 'user_registrations#cancel', as: nil |
| 31 | + get 'user/spree_user/sign_up', to: 'user_registrations#new', as: nil |
| 32 | + get 'user/spree_user/edit', to: 'user_registrations#edit', as: nil |
| 33 | + patch 'user/spree_user', to: 'user_registrations#update', as: nil |
| 34 | + put 'user/spree_user', to: 'user_registrations#update', as: nil |
| 35 | + delete 'user/spree_user', to: 'user_registrations#destroy', as: nil |
| 36 | + post 'user/spree_user', to: 'user_registrations#create', as: nil |
| 37 | + |
| 38 | + # Legacy devise generated helpers |
| 39 | + # These helpers are deprecated but we still want to support them |
| 40 | + # in order to give existing stores an upgrade path. |
| 41 | + get '/login', to: 'user_sessions#new', as: :new_spree_user_session |
| 42 | + post '/login', to: 'user_sessions#create', as: :spree_user_session |
| 43 | + match '/logout', to: 'user_sessions#destroy', as: :destroy_spree_user_session, via: Devise.sign_out_via |
| 44 | + get '/password/recover', to: 'user_passwords#new', as: :new_spree_user_password |
| 45 | + get '/password/change', to: 'user_passwords#edit', as: :edit_spree_user_password |
| 46 | + patch '/password/change', to: 'user_passwords#update', as: :spree_user_password |
| 47 | + get '/spree_user/cancel', to: 'user_registrations#cancel', as: :cancel_spree_user_registration |
| 48 | + get '/signup', to: 'user_registrations#new', as: :new_spree_user_registration |
| 49 | + get '/spree_user/edit', to: 'user_registrations#edit', as: :edit_spree_user_registration |
| 50 | + patch '/spree_user', to: 'user_registrations#update', as: :spree_user_registration |
| 51 | + |
| 52 | + # Custom devise routes |
22 | 53 | get '/login', to: 'user_sessions#new', as: :login |
23 | 54 | post '/login', to: 'user_sessions#create', as: :create_new_session |
24 | 55 | match '/logout', to: 'user_sessions#destroy', as: :logout, via: Devise.sign_out_via |
|
0 commit comments