X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/444a691578d26d64dbc0507509c562afaedca6e3..9f341430493cdaafb6ea9ce6ac29fc6af291d57c:/app/controllers/preferences_controller.rb diff --git a/app/controllers/preferences_controller.rb b/app/controllers/preferences_controller.rb index f002d5d39..1d96766ef 100644 --- a/app/controllers/preferences_controller.rb +++ b/app/controllers/preferences_controller.rb @@ -29,6 +29,11 @@ class PreferencesController < ApplicationController success &= site_color_scheme_preference.update(:v => params[:site_color_scheme]) end + if params[:map_color_scheme] + map_color_scheme_preference = current_user.preferences.find_or_create_by(:k => "map.color_scheme") + success &= map_color_scheme_preference.update(:v => params[:map_color_scheme]) + end + if success # Use a partial so that it is rendered during the next page load in the correct language. flash[:notice] = { :partial => "preferences/update_success_flash" }