Class: UserPlane::RouteConcerns::EmailIdentity

Inherits:
AbstractNamespacedConcern show all
Defined in:
lib/user_plane/route_concerns.rb

Overview

Provides extra routes to manage email identities: password resets and email confirmations

Instance Attribute Summary

Attributes inherited from AbstractConcern

#concern_options, #mapper

Instance Method Summary collapse

Methods inherited from AbstractNamespacedConcern

#call

Methods inherited from AbstractConcern

#call, #exists?, #initialize, #options

Constructor Details

This class inherits a constructor from UserPlane::RouteConcerns::AbstractConcern

Instance Method Details

#buildObject



134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/user_plane/route_concerns.rb', line 134

def build
  mapper.scope controller: :reset_passwords do
    mapper.resources :reset_passwords, options(only: [:new, :create],
                                               param: :code,
                                               as: :send_password_resets)

    mapper.resources :reset_passwords, options(only: [:edit, :update],
                                               param: :code)
  end

  mapper.get '/confirm_email/:code', options(to: 'confirm_email_addresses#update',
                                             as: :confirm_email_address)
end