]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/changeset.rb
One last commit tonight :P
[rails.git] / app / models / changeset.rb
index d41a8298940c5bdfd08f6632a27f12ddfa892a05..fa2d556b10c00195a20d5f8670224a22475ebb7b 100644 (file)
@@ -85,6 +85,10 @@ class Changeset < ActiveRecord::Base
   def bbox
     @bbox ||= [ min_lon, min_lat, max_lon, max_lat ]
   end
+  
+  def has_valid_bbox?
+    not bbox.include? nil
+  end
 
   ##
   # expand the bounding box to include the given bounding box. also, 
@@ -221,7 +225,7 @@ class Changeset < ActiveRecord::Base
   def update_from(other, user)
     # ensure that only the user who opened the changeset may modify it.
     unless user.id == self.user_id 
-      raise OSM::APIUserChangesetMismatchError 
+      raise OSM::APIUserChangesetMismatchError.new
     end
     
     # can't change a closed changeset