X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0e2a66e8de55b3719bd307261058b7f898598994..f2c57e0d71bbcb407ef43ee7c8c8458c76faeab6:/app/models/changeset.rb diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 9db213e77..aa674ea7f 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -80,13 +80,13 @@ class Changeset < ApplicationRecord self.closed_at = Time.now.getutc if is_open? end - def self.from_xml(xml, create = false) + def self.from_xml(xml, create: false) p = XML::Parser.string(xml, :options => XML::Parser::Options::NOERROR) doc = p.parse pt = doc.find_first("//osm/changeset") if pt - Changeset.from_xml_node(pt, create) + Changeset.from_xml_node(pt, :create => create) else raise OSM::APIBadXMLError.new("changeset", xml, "XML doesn't contain an osm/changeset element.") end @@ -94,7 +94,7 @@ class Changeset < ApplicationRecord raise OSM::APIBadXMLError.new("changeset", xml, e.message) end - def self.from_xml_node(pt, create = false) + def self.from_xml_node(pt, create: false) cs = Changeset.new if create cs.created_at = Time.now.getutc