Store selected map color scheme
This commit is contained in:
parent
444a691578
commit
9f34143049
2 changed files with 31 additions and 0 deletions
|
@ -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" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue