[openstreetmap-website] Changeset discussion feature (#772)

Łukasz Gurdek notifications at github.com
Fri Aug 8 10:50:34 UTC 2014


> @@ -0,0 +1,26 @@
> +changeset_attributes = { :id => changeset.id, :created_at => changeset.created_at.xmlschema, :closed_at => changeset.closed_at, :open => changeset.is_open? }
> +changeset_attributes[:uid] = changeset.user.id if changeset.user.data_public?
> +changeset_attributes[:user] = changeset.user.display_name if changeset.user.data_public?
> +changeset.bbox.to_unscaled.add_bounds_to(changeset_attributes, '_') if changeset.bbox.complete?
> +
> +xml.changeset(changeset_attributes) do |asterx|
> +  changeset.tags.each do |k,v|
> +    xml.tag :k => k, :v => v
> +  end
> +  if @comments
> +    xml.discussion do 

What is the better solution, to use XML from `:read` everywhere or to implement comments in `to_xml`?

I've taken it from notes and it probably wasn't the best idea. I will review the comments XML output.

Content-type and document type (like `<?xml version="1.0" encoding="UTF-8"?>`) is added automatically when using `render` with XML template.

Outdating by subsequent changes was the rationale for delaying comments.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/772/files#r15987139
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20140808/0d329b93/attachment-0001.html>


More information about the rails-dev mailing list