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