X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6c66507427961a22a8f282b5b2f4ab7fda1dad6f..b7596f7fbc21a2c02b8ec12c971da670c9b7c4f8:/app/models/way.rb diff --git a/app/models/way.rb b/app/models/way.rb index 97f44c117..637f41e28 100644 --- a/app/models/way.rb +++ b/app/models/way.rb @@ -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 @@ -214,7 +214,7 @@ class Way < ActiveRecord::Base def create_with_history(user) check_create_consistency(self, user) unless self.preconditions_ok? - raise OSM::APIPreconditionFailedError("Cannot create way: data is invalid.") + raise OSM::APIPreconditionFailedError.new("Cannot create way: data is invalid.") end self.version = 0 self.visible = true