Class: LatoCms::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/lato_cms/config.rb

Overview

Config This class contains the default configuration of the engine.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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_rolesObject

Returns the value of attribute admin_roles.



6
7
8
# File 'lib/lato_cms/config.rb', line 6

def admin_roles
  @admin_roles
end

#localesObject

Returns the value of attribute locales.



6
7
8
# File 'lib/lato_cms/config.rb', line 6

def locales
  @locales
end

#templates_pathObject

Returns the value of attribute templates_path.



6
7
8
# File 'lib/lato_cms/config.rb', line 6

def templates_path
  @templates_path
end