Class: Alchemy::Config

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

Class Method Summary collapse

Class Method Details

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

Returns the configuration for given parameter name.

Parameters:

  • name (String)


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

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

.showObject

Returns a merged configuration of the following files

Alchemy´s 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 Alchemy´s 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