Files
nairobi/app/helpers/settings_helper.rb
Javi Martín 3931b43b87 Move omniauth form partial to a component
This way we simplify the view a little bit and replace some slow system
tests with faster component tests.
2024-10-28 21:23:56 +01:00

10 lines
252 B
Ruby

module SettingsHelper
def feature?(name)
setting["feature.#{name}"].presence || setting["process.#{name}"].presence || setting[name].presence
end
def setting
@all_settings ||= Setting.all.to_h { |s| [s.key, s.value.presence] }
end
end