Fix typo of missing .new for some of the errors. Tests are useful.
authorShaun McDonald <shaun@shaunmcdonald.me.uk>
Sun, 26 Apr 2009 20:56:58 +0000 (20:56 +0000)
committerShaun McDonald <shaun@shaunmcdonald.me.uk>
Sun, 26 Apr 2009 20:56:58 +0000 (20:56 +0000)
app/models/way.rb

index 6f12f4304db7fa94106dab5ccbcfea6c2875872b..637f41e2883580c83b3385ac7db162ead4493a24 100644 (file)
@@ -200,7 +200,7 @@ class Way < ActiveRecord::Base
   def update_from(new_way, user)
     check_consistency(self, new_way, user)
     unless new_way.preconditions_ok?
-      raise OSM::APIPreconditionFailedError("Cannot update way #{self.id}: data is invalid.")
+      raise OSM::APIPreconditionFailedError.new("Cannot update way #{self.id}: data is invalid.")
     end
 
     self.changeset_id = new_way.changeset_id