20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'app/controllers/instance_configuration_controller.rb', line 20
def index
authorize! :show, Iqvoc.config
settings = Iqvoc.config.defaults.
each_with_object({}) do |(key, default_value), hsh|
hsh[key] = serialize(Iqvoc.config[key], default_value)
end
@settings_by_namespace = settings.inject({}) do |memo, (key, value)|
namespace, setting = key.split('.', 2)
namespace = setting ? namespace : 'common'
memo[namespace] ||= {}
memo[namespace][key] = value
memo
end
end
|