|
3 | 3 | Spree::Core::Engine.routes.draw do |
4 | 4 | if SolidusSupport.frontend_available? && Spree::Auth::Config.draw_frontend_routes |
5 | 5 | devise_for(:spree_user, { |
6 | | - class_name: 'Spree::User', |
| 6 | + class_name: "Spree::User", |
7 | 7 | controllers: { |
8 | | - sessions: 'spree/user_sessions', |
9 | | - registrations: 'spree/user_registrations', |
10 | | - passwords: 'spree/user_passwords', |
11 | | - confirmations: 'spree/user_confirmations' |
| 8 | + sessions: "spree/user_sessions", |
| 9 | + registrations: "spree/user_registrations", |
| 10 | + passwords: "spree/user_passwords", |
| 11 | + confirmations: "spree/user_confirmations" |
12 | 12 | }, |
13 | 13 | skip: [:unlocks, :omniauth_callbacks], |
14 | | - path_names: { sign_out: 'logout' }, |
| 14 | + path_names: {sign_out: "logout"}, |
15 | 15 | path_prefix: :user, |
16 | 16 | router_name: :spree |
17 | 17 | }) |
18 | 18 |
|
19 | 19 | resources :users, only: [:edit, :update] |
20 | 20 |
|
21 | 21 | devise_scope :spree_user do |
22 | | - get '/login', to: 'user_sessions#new', as: :login |
23 | | - post '/login', to: 'user_sessions#create', as: :create_new_session |
24 | | - match '/logout', to: 'user_sessions#destroy', as: :logout, via: Devise.sign_out_via |
25 | | - get '/signup', to: 'user_registrations#new', as: :signup |
26 | | - post '/signup', to: 'user_registrations#create', as: :registration |
27 | | - get '/password/recover', to: 'user_passwords#new', as: :recover_password |
28 | | - post '/password/recover', to: 'user_passwords#create', as: :reset_password |
29 | | - get '/password/change', to: 'user_passwords#edit', as: :edit_password |
30 | | - put '/password/change', to: 'user_passwords#update', as: :update_password |
31 | | - get '/confirm', to: 'user_confirmations#show', as: :confirmation if Spree::Auth::Config[:confirmable] |
| 22 | + get "/login", to: "user_sessions#new", as: :login |
| 23 | + post "/login", to: "user_sessions#create", as: :create_new_session |
| 24 | + match "/logout", to: "user_sessions#destroy", as: :logout, via: Devise.sign_out_via |
| 25 | + get "/signup", to: "user_registrations#new", as: :signup |
| 26 | + post "/signup", to: "user_registrations#create", as: :registration |
| 27 | + get "/password/recover", to: "user_passwords#new", as: :recover_password |
| 28 | + post "/password/recover", to: "user_passwords#create", as: :reset_password |
| 29 | + get "/password/change", to: "user_passwords#edit", as: :edit_password |
| 30 | + put "/password/change", to: "user_passwords#update", as: :update_password |
| 31 | + get "/confirm", to: "user_confirmations#show", as: :confirmation if Spree::Auth::Config[:confirmable] |
32 | 32 | end |
33 | 33 |
|
34 | | - get '/checkout/registration', to: 'checkout#registration', as: :checkout_registration |
35 | | - put '/checkout/registration', to: 'checkout#update_registration', as: :update_checkout_registration |
| 34 | + get "/checkout/registration", to: "checkout#registration", as: :checkout_registration |
| 35 | + put "/checkout/registration", to: "checkout#update_registration", as: :update_checkout_registration |
36 | 36 |
|
37 | | - resource :account, controller: 'users' |
| 37 | + resource :account, controller: "users" |
38 | 38 | end |
39 | 39 |
|
40 | 40 | if SolidusSupport.backend_available? && Spree::Auth::Config.draw_backend_routes |
41 | 41 | namespace :admin do |
42 | 42 | devise_for(:spree_user, { |
43 | | - class_name: 'Spree::User', |
| 43 | + class_name: "Spree::User", |
44 | 44 | singular: :spree_user, |
45 | 45 | skip: :all, |
46 | | - path_names: { sign_out: 'logout' }, |
| 46 | + path_names: {sign_out: "logout"}, |
47 | 47 | controllers: { |
48 | | - sessions: 'spree/admin/user_sessions', |
49 | | - passwords: 'spree/admin/user_passwords' |
| 48 | + sessions: "spree/admin/user_sessions", |
| 49 | + passwords: "spree/admin/user_passwords" |
50 | 50 | }, |
51 | 51 | router_name: :spree |
52 | 52 | }) |
53 | 53 |
|
54 | 54 | devise_scope :spree_user do |
55 | | - get '/authorization_failure', to: 'user_sessions#authorization_failure', as: :unauthorized |
56 | | - get '/login', to: 'user_sessions#new', as: :login |
57 | | - post '/login', to: 'user_sessions#create', as: :create_new_session |
58 | | - match '/logout', to: 'user_sessions#destroy', as: :logout, via: Devise.sign_out_via |
| 55 | + get "/authorization_failure", to: "user_sessions#authorization_failure", as: :unauthorized |
| 56 | + get "/login", to: "user_sessions#new", as: :login |
| 57 | + post "/login", to: "user_sessions#create", as: :create_new_session |
| 58 | + match "/logout", to: "user_sessions#destroy", as: :logout, via: Devise.sign_out_via |
59 | 59 |
|
60 | | - get '/password/recover', to: 'user_passwords#new', as: :recover_password |
61 | | - post '/password/recover', to: 'user_passwords#create', as: :reset_password |
62 | | - get '/password/change', to: 'user_passwords#edit', as: :edit_password |
63 | | - put '/password/change', to: 'user_passwords#update', as: :update_password |
| 60 | + get "/password/recover", to: "user_passwords#new", as: :recover_password |
| 61 | + post "/password/recover", to: "user_passwords#create", as: :reset_password |
| 62 | + get "/password/change", to: "user_passwords#edit", as: :edit_password |
| 63 | + put "/password/change", to: "user_passwords#update", as: :update_password |
64 | 64 | end |
65 | 65 | end |
66 | 66 | end |
|
0 commit comments