+
+ success = current_user.save
+
+ if params[:site_color_scheme]
+ site_color_scheme_preference = current_user.preferences.find_or_create_by(:k => "site.color_scheme")
+ 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