X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/7f955a4aca277350a70bb95f0ca97e64d7d808c4..cd66a5db99fda4920ed559ec71163d5d01ba1f4a:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index 1a50f7053..ecf93b6f7 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -33,6 +33,7 @@ class User < ActiveRecord::Base validates_numericality_of :home_lat, :allow_nil => true validates_numericality_of :home_lon, :allow_nil => true validates_numericality_of :home_zoom, :only_integer => true, :allow_nil => true + validates_inclusion_of :preferred_editor, :in => Editors::ALL_EDITORS, :allow_nil => true before_save :encrypt_password