Class: MyForum::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/my_forum/engine.rb

Constant Summary collapse

USE_CUSTOM_USER_MODEL =
false
CUSTOM_USER_CLASS =
'User'
CUSTOM_USER_LOGIN_ATTR =
'login'
CUSTOM_USER_PASSWORD_ATTR =
'password'
CUSTOM_AUTHENTICATE_METHOD =
'users#authenticate'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEngine

Returns a new instance of Engine.



29
30
31
32
33
34
35
# File 'lib/my_forum/engine.rb', line 29

def initialize
  self.use_custom_user_model      = USE_CUSTOM_USER_MODEL
  self.custom_user_class          = CUSTOM_USER_CLASS
  self.     = CUSTOM_USER_LOGIN_ATTR
  self.custom_user_password_attr  = CUSTOM_USER_PASSWORD_ATTR
  self.custom_authenticate_method = CUSTOM_AUTHENTICATE_METHOD
end

Instance Attribute Details

#custom_authenticate_methodObject

Returns the value of attribute custom_authenticate_method.



26
27
28
# File 'lib/my_forum/engine.rb', line 26

def custom_authenticate_method
  @custom_authenticate_method
end

#custom_user_classObject

Returns the value of attribute custom_user_class.



26
27
28
# File 'lib/my_forum/engine.rb', line 26

def custom_user_class
  @custom_user_class
end

#custom_user_login_attrObject

Returns the value of attribute custom_user_login_attr.



26
27
28
# File 'lib/my_forum/engine.rb', line 26

def 
  @custom_user_login_attr
end

#custom_user_password_attrObject

Returns the value of attribute custom_user_password_attr.



26
27
28
# File 'lib/my_forum/engine.rb', line 26

def custom_user_password_attr
  @custom_user_password_attr
end

#use_custom_user_modelObject

Returns the value of attribute use_custom_user_model.



26
27
28
# File 'lib/my_forum/engine.rb', line 26

def use_custom_user_model
  @use_custom_user_model
end