]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Initial work on support for multiple editors
[rails.git] / app / models / user.rb
index 1a50f70532184eacc6a0063c286ae135980052bf..ecf93b6f790f5505d78ccaab1905e7e5827dec17 100644 (file)
@@ -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