X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a7ea614dd05af2a53b30e1dce6bfe29044e1f5a5..0b6d9ce877a08cb762b5d9354847187c6b43e216:/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