Class: Tolaria::Configuration

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

Overview

Tolaria’s configuration is a class so that an exception is raised if you try to configure a key that doesn't exist. Refer to the comments in the initializer that Tolaria generated for you when you ran rails generate tolaria:install.

Instance Attribute Summary collapse

Instance Attribute Details

#bcrypt_costObject

The cost factor for bcrypt



9
10
11
# File 'lib/tolaria/config.rb', line 9

def bcrypt_cost
  @bcrypt_cost
end

#company_nameObject

The name of the company using this admin interface



11
12
13
# File 'lib/tolaria/config.rb', line 11

def company_name
  @company_name
end

#default_redirectObject

The default redirect path when administrators log in or no better path exists



13
14
15
# File 'lib/tolaria/config.rb', line 13

def default_redirect
  @default_redirect
end

#display_name_methodsObject

An array of method names Tolaria uses to attempt to convert a model to a string



15
16
17
# File 'lib/tolaria/config.rb', line 15

def display_name_methods
  @display_name_methods
end

#from_addressObject

The From header for emails Tolaria sends



17
18
19
# File 'lib/tolaria/config.rb', line 17

def from_address
  @from_address
end

An array of hashes for configuring Help Links



19
20
21
# File 'lib/tolaria/config.rb', line 19

def help_links
  @help_links
end

#lockout_durationObject

The number of seconds that an administrator is locked out when they hit the rate-limit



21
22
23
# File 'lib/tolaria/config.rb', line 21

def lockout_duration
  @lockout_duration
end

#lockout_thresholdObject

The number of times an administrator can flunk their passcode challenge or request a token before Tolaria disables their account.



23
24
25
# File 'lib/tolaria/config.rb', line 23

def lockout_threshold
  @lockout_threshold
end

#markdown_rendererObject

A string that names a Markdown renderer for Tolaria to use.



25
26
27
# File 'lib/tolaria/config.rb', line 25

def markdown_renderer
  @markdown_renderer
end

An array of configured menu category labels



27
28
29
# File 'lib/tolaria/config.rb', line 27

def menu_categories
  @menu_categories
end

#page_sizeObject

The default page size Tolaria uses when paginating



29
30
31
# File 'lib/tolaria/config.rb', line 29

def page_size
  @page_size
end

#passcode_lifespanObject

The number of seconds that a generated passcode is valid



31
32
33
# File 'lib/tolaria/config.rb', line 31

def passcode_lifespan
  @passcode_lifespan
end

#permitted_paramsObject

The default array of permitted params (internal use only)



33
34
35
# File 'lib/tolaria/config.rb', line 33

def permitted_params
  @permitted_params
end