X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2ca74ab3ef47143cb42403f207e438eacda08dc5..3d79f9fd88ab2784b292c8eafc46070472b2a4c9:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 56d9a6763..5bfec4ab6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -281,15 +281,15 @@ class ApplicationController < ActionController::Base end end - def preferred_site_color_scheme + def preferred_color_scheme(subject) if current_user - current_user.preferences.find_by(:k => "site.color_scheme")&.v || "auto" + current_user.preferences.find_by(:k => "#{subject}.color_scheme")&.v || "auto" else "auto" end end - helper_method :preferred_editor, :preferred_site_color_scheme + helper_method :preferred_editor, :preferred_color_scheme def update_totp if Settings.key?(:totp_key)