|
16 | 16 | resources :users, only: [:edit, :update] |
17 | 17 |
|
18 | 18 | devise_scope :spree_user do |
19 | | - # Legacy devise generated routes |
20 | | - get 'user/spree_user/sign_in', to: 'user_sessions#new', as: :new_spree_user_session |
21 | | - post 'user/spree_user/sign_in', to: 'user_sessions#create', as: :spree_user_session |
22 | | - match 'user/spree_user/logout', to: 'user_sessions#destroy', as: :destroy_spree_user_session, via: Devise.sign_out_via |
23 | | - get 'user/spree_user/password/new', to: 'user_passwords#new', as: :new_spree_user_password |
24 | | - get 'user/spree_user/password/edit', to: 'user_passwords#edit', as: :edit_spree_user_password |
25 | | - patch 'user/spree_user/password', to: 'user_passwords#update', as: :spree_user_password |
26 | | - put 'user/spree_user/password', to: 'user_passwords#update' |
27 | | - post 'user/spree_user/password', to: 'user_passwords#create' |
28 | | - get 'user/spree_user/cancel', to: 'user_registrations#cancel', as: :cancel_spree_user_registration |
29 | | - get 'user/spree_user/sign_up', to: 'user_registrations#new', as: :new_spree_user_registration |
30 | | - get 'user/spree_user/edit', to: 'user_registrations#edit', as: :edit_spree_user_registration |
31 | | - patch 'user/spree_user', to: 'user_registrations#update', as: :spree_user_registration |
| 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 |
32 | 34 | put 'user/spree_user', to: 'user_registrations#update', as: nil |
33 | 35 | delete 'user/spree_user', to: 'user_registrations#destroy', as: nil |
34 | 36 | post 'user/spree_user', to: 'user_registrations#create', as: nil |
35 | 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 | + |
36 | 52 | # Custom devise routes |
37 | 53 | get '/login', to: 'user_sessions#new', as: :login |
38 | 54 | post '/login', to: 'user_sessions#create', as: :create_new_session |
|
0 commit comments