X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9b4271ed8c0577d23c6d77c4be0ed8a8082dc86c..bb3108cb99e95775492157fe135eeda5e70a664e:/lib/osm.rb diff --git a/lib/osm.rb b/lib/osm.rb index eb5afd562..0a62d14c0 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -43,8 +43,14 @@ module OSM # Raised when to delete an already-deleted object. class APIAlreadyDeletedError < APIError + def initialize(object = "object", object_id = "") + @object, @object_id = object, object_id + end + + attr_reader :object, :object_id + def render_opts - { :text => "The object has already been deleted", :status => :gone, :content_type => "text/plain" } + { :text => "The #{object} with the id #{object_id} has already been deleted", :status => :gone, :content_type => "text/plain" } end end