Class: LatoCms::Config
- Inherits:
-
Object
- Object
- LatoCms::Config
- Defined in:
- lib/lato_cms/config.rb
Overview
Config This class contains the default configuration of the engine.
Instance Attribute Summary collapse
-
#admin_roles ⇒ Object
Returns the value of attribute admin_roles.
-
#locales ⇒ Object
Returns the value of attribute locales.
-
#templates_path ⇒ Object
Returns the value of attribute templates_path.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/lato_cms/config.rb', line 8 def initialize @locales = [:en] @templates_path = 'config/lato_cms' # Admin roles exposed on Lato::User#lato_cms_admin_role and rendered # as a select by lato_users. Ordered map of role key => integer value; # labels are resolved via i18n (lato_cms.admin_roles.<key>). # `operator` has read/edit access; `admin` also manages pages # (create, update, delete) and translation links. @admin_roles = { none: 0, operator: 1, admin: 2 } end |
Instance Attribute Details
#admin_roles ⇒ Object
Returns the value of attribute admin_roles.
6 7 8 |
# File 'lib/lato_cms/config.rb', line 6 def admin_roles @admin_roles end |
#locales ⇒ Object
Returns the value of attribute locales.
6 7 8 |
# File 'lib/lato_cms/config.rb', line 6 def locales @locales end |
#templates_path ⇒ Object
Returns the value of attribute templates_path.
6 7 8 |
# File 'lib/lato_cms/config.rb', line 6 def templates_path @templates_path end |