Module: GoogleAuthentication
- Defined in:
- lib/google_authentication.rb,
lib/google_authentication/engine.rb,
lib/google_authentication/version.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
- VERSION =
'0.3.0'
- @@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
33 34 35 36 37 38 39 40 |
# File 'lib/google_authentication.rb', line 33 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
44 45 46 |
# File 'lib/google_authentication.rb', line 44 def self.devise_table model_name.to_s.pluralize.to_sym end |
.setup {|self| ... } ⇒ Object
Allows config in initializer
26 27 28 |
# File 'lib/google_authentication.rb', line 26 def self.setup yield self end |