]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Avoid integer overflow when computing shortcodes
[rails.git] / app / controllers / user_controller.rb
index 19e8aeb7c16ac60fda8aa8f307f9d6cc68db93d3..6935af3bca5f3508fa7d2222a2f142975ebdc5b8 100644 (file)
@@ -109,6 +109,12 @@ class UserController < ApplicationController
       @user.home_lat = params[:user][:home_lat]
       @user.home_lon = params[:user][:home_lon]
 
+      if params[:user][:preferred_editor] == "default"
+        @user.preferred_editor = nil
+      else
+        @user.preferred_editor = params[:user][:preferred_editor]
+      end
+
       if @user.save
         set_locale