[openstreetmap/openstreetmap-website] Refactor trace api_update to avoid duplicating tags (#1614)

Tom Hughes notifications at github.com
Fri Aug 18 09:46:45 UTC 2017


Assigning to `tags` is enough to trigger deletion of the old tags I take it?

There is of course a fundamental difference between traces and other objects in that we don't keep multiple versions of traces - so it makes sense to have `from_xml` on a node be a constructor that creates the new object we are going to save that replaces the current version. Though I guess we don't keep history for changesets either.

I certainly think that if we go this route we should change the method name to `update_from_xml` or something so that we don't different models using the same name in different ways.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1614#issuecomment-323310333
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170818/3860a70e/attachment-0001.html>


More information about the rails-dev mailing list