Class: LatoSpaces::Config
- Inherits:
-
Object
- Object
- LatoSpaces::Config
- Defined in:
- lib/lato_spaces/config.rb
Overview
Config This class contains the default configuration of the engine.
Instance Attribute Summary collapse
-
#group_icon ⇒ Object
Icon of the group (bootstrap icon).
-
#group_params ⇒ Object
Params of the group.
-
#membership_params ⇒ Object
Params of the membership.
-
#permit_group_creation ⇒ Object
Permit creation of groups for users (not admins).
-
#permit_group_management ⇒ Object
Permit management of groups for users (not admins).
-
#permit_group_preferred ⇒ Object
Permit users to choose a preferred group.
-
#setgroup_auto_after_login ⇒ Object
Auto-select first group after login.
-
#setgroup_auto_after_login_if_single ⇒ Object
Auto-select first group after login only if user has a single group.
-
#setgroup_redirect_path ⇒ Object
Path of the redirect after set group.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/lato_spaces/config.rb', line 36 def initialize @setgroup_redirect_path = nil @setgroup_auto_after_login = false @setgroup_auto_after_login_if_single = false @group_icon = 'bi bi-people-fill' @group_params = i[name] @membership_params = i[email] @permit_group_creation = false @permit_group_management = false @permit_group_preferred = false end |
Instance Attribute Details
#group_icon ⇒ Object
Icon of the group (bootstrap icon).
19 20 21 |
# File 'lib/lato_spaces/config.rb', line 19 def group_icon @group_icon end |
#group_params ⇒ Object
Params of the group.
22 23 24 |
# File 'lib/lato_spaces/config.rb', line 22 def group_params @group_params end |
#membership_params ⇒ Object
Params of the membership.
25 26 27 |
# File 'lib/lato_spaces/config.rb', line 25 def membership_params @membership_params end |
#permit_group_creation ⇒ Object
Permit creation of groups for users (not admins).
28 29 30 |
# File 'lib/lato_spaces/config.rb', line 28 def permit_group_creation @permit_group_creation end |
#permit_group_management ⇒ Object
Permit management of groups for users (not admins).
31 32 33 |
# File 'lib/lato_spaces/config.rb', line 31 def permit_group_management @permit_group_management end |
#permit_group_preferred ⇒ Object
Permit users to choose a preferred group.
34 35 36 |
# File 'lib/lato_spaces/config.rb', line 34 def permit_group_preferred @permit_group_preferred end |
#setgroup_auto_after_login ⇒ Object
Auto-select first group after login. NOTE: Requires to set ‘setgroup_redirect_path` to work properly.
12 13 14 |
# File 'lib/lato_spaces/config.rb', line 12 def setgroup_auto_after_login @setgroup_auto_after_login end |
#setgroup_auto_after_login_if_single ⇒ Object
Auto-select first group after login only if user has a single group. NOTE: Requires to set ‘setgroup_redirect_path` to work properly.
16 17 18 |
# File 'lib/lato_spaces/config.rb', line 16 def setgroup_auto_after_login_if_single @setgroup_auto_after_login_if_single end |
#setgroup_redirect_path ⇒ Object
Path of the redirect after set group.
8 9 10 |
# File 'lib/lato_spaces/config.rb', line 8 def setgroup_redirect_path @setgroup_redirect_path end |