Class: Booth::Routes::Userland

Inherits:
Object
  • Object
show all
Includes:
Calls
Defined in:
lib/booth/routes/userland.rb

Overview

All Rails routes needed by Users.

Instance Method Summary collapse

Instance Method Details

#callObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/booth/routes/userland.rb', line 9

def call
  <<-RUBY
    # Users creating their own accounts.
    resource :registration, only: %i[new create]

    # Logging in
    resource :login, only: %i[new create destroy]
    resource :remote_login, only: %i[show update], path: #{I18n.t('booth.remote_login_path').to_sym.inspect} # e.g. `path: :fernlogin`

    # Onboarding
    resources :onboardings, only: %i[show update], path: :onboard

    # Self-service Portal
    resources :sessions, only: %i[index show destroy] do
      delete :destroy_all_others, on: :collection
    end
    resources :webauths, only: %i[index new create destroy] do
      post :sudo, on: :collection
    end
  RUBY
end