Module: Identity
- Defined in:
- lib/identity.rb,
lib/identity/engine.rb,
lib/identity/version.rb,
lib/identity/mixins/user.rb,
lib/identity/view_helper.rb,
lib/generators/identity/views_generator.rb,
app/controllers/identity/base_controller.rb,
lib/generators/identity/install_generator.rb,
lib/generators/identity/locales_generator.rb,
app/controllers/identity/omniauth_callbacks_controller.rb
Defined Under Namespace
Modules: Mixins, ViewHelper
Classes: BaseController, Engine, InstallGenerator, LocalesGenerator, OmniauthCallbacksController, ViewsGenerator
Constant Summary
collapse
- VERSION =
"0.5.4"
Class Method Summary
collapse
Class Method Details
.controllers ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/identity.rb', line 28
def self.controllers
if Devise.omniauth_providers.any?
{ omniauth_callbacks: "identity/omniauth_callbacks" }
else
{ }
end
end
|
.delegate_to_devise?(name) ⇒ Boolean
48
49
50
51
|
# File 'lib/identity.rb', line 48
def self.delegate_to_devise?(name)
name.in?(%w(omniauth)) ||
name.ends_with?('=') && Devise.respond_to?(name)
end
|
.method_missing(name, *args, &block) ⇒ Object
40
41
42
43
44
45
46
|
# File 'lib/identity.rb', line 40
def self.method_missing(name, *args, &block)
if delegate_to_devise?(name.to_s)
Devise.public_send(name, *args, &block)
else
super
end
end
|
.respond_to_missing?(name, include_private = false) ⇒ Boolean
53
54
55
|
# File 'lib/identity.rb', line 53
def self.respond_to_missing?(name, include_private = false)
(name.to_s.ends_with?('=') && Devise.respond_to?(name, include_private)) || super
end
|
.setup {|_self| ... } ⇒ Object
36
37
38
|
# File 'lib/identity.rb', line 36
def self.setup
yield self
end
|
.user_class ⇒ Object
24
25
26
|
# File 'lib/identity.rb', line 24
def self.user_class
user_class_name.constantize
end
|