From 28a90f05f84d82296ef82af688d8cd495bf2872e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 1 Jul 2023 21:51:32 +0200 Subject: [PATCH] Make installation details code easier to follow --- app/controllers/installation_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/installation_controller.rb b/app/controllers/installation_controller.rb index 95fe9e5d0..da45177d3 100644 --- a/app/controllers/installation_controller.rb +++ b/app/controllers/installation_controller.rb @@ -14,6 +14,9 @@ class InstallationController < ApplicationController end def settings_feature_flags - Setting.where("key LIKE 'process.%'").each_with_object({}) { |x, n| n[x.key.remove("process.")] = x.value } + Setting.where("key LIKE 'process.%'") + .pluck(:key, :value) + .to_h + .transform_keys { |key| key.remove("process.") } end end