Skip to content

Commit af06e41

Browse files
committed
Store selected color scheme in cookies
1 parent d6e083a commit af06e41

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/controllers/preferences_controller.rb

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ def update
2121
else
2222
params[:user][:preferred_editor]
2323
end
24+
25+
cookies["_osm_color_scheme"] = {
26+
:value => params[:color_scheme],
27+
:expires => 10.years.from_now
28+
}
29+
2430
if current_user.save
2531
# Use a partial so that it is rendered during the next page load in the correct language.
2632
flash[:notice] = { :partial => "preferences/update_success_flash" }

0 commit comments

Comments
 (0)