Module: Authentifyd

Defined in:
lib/authentifyd.rb,
app/models/authentifyd.rb,
lib/authentifyd/engine.rb,
lib/authentifyd/version.rb,
app/helpers/authentifyd/application_helper.rb,
app/controllers/authentifyd/application_controller.rb

Defined Under Namespace

Modules: ApplicationHelper Classes: ApplicationController, Authentication, AuthenticationsController, ConfirmationsController, Engine, PasswordsController, RegistrationsController, SessionsController, UnlocksController, User

Constant Summary collapse

VERSION =
"0.0.13"

Class Method Summary collapse

Class Method Details

.configure(config = {}) ⇒ Object



37
38
39
40
41
42
# File 'lib/authentifyd.rb', line 37

def self.configure(config = {})
  @@custom_head_snippet = config[:custom_head_snippet]
  @@custom_bottom_snippet = config[:custom_bottom_snippet]
  @@top_navbar_snippet = config[:top_navbar_snippet]
  @@default_after_sign_in_path = config[:default_after_sign_in_path]
end

.devise_configObject



19
20
21
22
23
24
25
26
27
# File 'lib/authentifyd.rb', line 19

def self.devise_config
  (@@devise_config || {}).reverse_merge({
    :registrations_controller   => 'authentifyd/registrations',
    :sessions_controller        => 'authentifyd/sessions',
    :confirmations_controller   => 'authentifyd/confirmations',
    :passwords_controller       => 'authentifyd/passwords',
    :unlocks_controller         => 'authentifyd/unlocks'
  })
end

.embeddable_callback_path(_path) ⇒ Object



33
34
35
# File 'lib/authentifyd.rb', line 33

def self.embeddable_callback_path(_path)
  (Authentifyd.path_prefix ?  "#{Authentifyd.path_prefix}/" : '') + Authentifyd.path + _path
end

.pathObject



29
30
31
# File 'lib/authentifyd.rb', line 29

def self.path
  @@path ||= "/"
end

.table_name_prefixObject



2
3
4
# File 'app/models/authentifyd.rb', line 2

def self.table_name_prefix
  'authentifyd_'
end