Class: Alchemy::Config

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

Class Method Summary collapse

Class Method Details

.deprecated_configsObject

A list of deprecated configurations a value of nil means there is no new default any not nil value is the new default



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

def deprecated_configs
  {}
end

.get(name) ⇒ Object Also known as: parameter

Returns the configuration for given parameter name.

Parameters:

  • name (String)


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

def get(name)
  check_deprecation(name)
  show[name.to_s]
end

.showObject

Returns a merged configuration of the following files

Alchemys default config: gems/../alchemy_cms/config/alchemy/config.yml Your apps default config: your_app/config/alchemy/config.yml Environment specific config: your_app/config/alchemy/development.config.yml

An environment specific config overwrites the settings of your apps default config, while your apps default config has precedence over Alchemys default config.



26
27
28
# File 'lib/alchemy/config.rb', line 26

def show
  @config ||= merge_configs!(alchemy_config, main_app_config, env_specific_config)
end