]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/note.rb
Merge branch 'master' into openstreetbugs
[rails.git] / app / models / note.rb
index 76c5e53081158809f55f381e3457719f2cf9e38a..c32b1679b07b593f1dab2c8e9045e48cb1796e71 100644 (file)
@@ -14,11 +14,13 @@ class Note < ActiveRecord::Base
   validates_inclusion_of :status, :in => ["open", "closed", "hidden"]
   validate :validate_position
 
+  attr_accessible :lat, :lon
+
   after_initialize :set_defaults
 
   # Sanity check the latitude and longitude and add an error if it's broken
   def validate_position
-    errors.add_to_base("Note is not in the world") unless in_world?
+    errors.add(:base, "Note is not in the world") unless in_world?
   end
 
   # Close a note