Skip to content

Commit

Permalink
Store selected color scheme in cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Nov 16, 2024
1 parent 3017cea commit 4edcaa4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/preferences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def update
else
params[:user][:preferred_editor]
end

cookies["_osm_color_scheme"] = params[:color_scheme]

if current_user.save
# Use a partial so that it is rendered during the next page load in the correct language.
flash[:notice] = { :partial => "preferences/update_success_flash" }
Expand Down

0 comments on commit 4edcaa4

Please sign in to comment.