Module: Nyauth::Route

Included in:
ActionDispatch::Routing::Mapper
Defined in:
lib/nyauth/route.rb

Instance Method Summary collapse

Instance Method Details

#initialize(*args) ⇒ Object



3
4
5
6
# File 'lib/nyauth/route.rb', line 3

def initialize(*args)
  super(*args)
  nyauth_concerns
end

#nyauth_concernsObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/nyauth/route.rb', line 8

def nyauth_concerns
  concern :nyauth_registrable do
    resource :registration, only: %i(new create)
  end
  concern :nyauth_authenticatable do
    resource :session, only: %i(new create destroy)
    resource :password, only: %i(edit update)
    resources :reset_password_requests, only: %i(new create)
    resources :reset_passwords, param: :reset_password_key, only: %i(edit update)
  end
  concern :nyauth_confirmable do
    resources :confirmation_requests, only: %i(new create)
    get '/confirmations/:confirmation_key' => 'confirmations#update', as: :confirmation
  end
end