Module: Alchemy::ConfigurationMethods

Extended by:
ActiveSupport::Concern
Included in:
BaseController
Defined in:
lib/alchemy/configuration_methods.rb

Instance Method Summary collapse

Instance Method Details

#configuration(name) ⇒ Object

Returns the configuration value of given key.

Config file is in config/alchemy/config.yml



13
14
15
# File 'lib/alchemy/configuration_methods.rb', line 13

def configuration(name)
  Config.get(name)
end

#multi_language?Boolean

Returns true if more than one language is published.

Returns:

  • (Boolean)


19
20
21
# File 'lib/alchemy/configuration_methods.rb', line 19

def multi_language?
  Language.published.count > 1
end

#multi_site?Boolean

Returns true if more than one site exists.

Returns:

  • (Boolean)


25
26
27
# File 'lib/alchemy/configuration_methods.rb', line 25

def multi_site?
  Site.count > 1
end