Module: Alchemy::ConfigurationMethods
- Extended by:
- ActiveSupport::Concern
- Included in:
- BaseController
- Defined in:
- lib/alchemy/configuration_methods.rb
Instance Method Summary collapse
-
#configuration(name) ⇒ Object
Returns the configuration value of given key.
-
#multi_language? ⇒ Boolean
Returns true if more than one language is published.
-
#multi_site? ⇒ Boolean
Returns true if more than one site exists.
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.
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.
25 26 27 |
# File 'lib/alchemy/configuration_methods.rb', line 25 def multi_site? Site.count > 1 end |