Module: GoogleAuthentication
- Defined in:
- lib/google_authentication.rb,
lib/google_authentication/engine.rb,
lib/google_authentication/acts_as_google_user.rb,
lib/generators/google_authentication/install_generator.rb,
lib/generators/google_authentication/google_authentication_generator.rb
Overview
Main module for the gem
Defined Under Namespace
Modules: ActsAsGoogleUser, Generators Classes: Engine
Constant Summary collapse
- @@domain =
default value for google domain used for authentication
"gmail.com"
- @@model_name =
default model used (singular name)
:user
Class Method Summary collapse
-
.define_routes? ⇒ bool
Used in the routes file to decide wheter to add routes to the application.
-
.devise_table ⇒ Symbol
Return a symbol which is used to build devise routes.
-
.setup {|self| ... } ⇒ Object
Allows config in initializer.
Class Method Details
.define_routes? ⇒ bool
Used in the routes file to decide wheter to add routes to the application
31 32 33 34 35 36 37 38 |
# File 'lib/google_authentication.rb', line 31 def self.define_routes? begin Object.const_get(model_name.to_s.camelize) rescue NameError return false end return true end |
.devise_table ⇒ Symbol
Return a symbol which is used to build devise routes
42 43 44 |
# File 'lib/google_authentication.rb', line 42 def self.devise_table model_name.to_s.pluralize.to_sym end |
.setup {|self| ... } ⇒ Object
Allows config in initializer
24 25 26 |
# File 'lib/google_authentication.rb', line 24 def self.setup yield self end |