Fix typo of missing .new for some of the errors. Tests are useful.
[rails.git] / 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