<p>API: de-duplicate metadata code for n/w/r …</p>

<p>The common code has been refactored into <code>lib/ObjectMetadata::add_metadata_to_xml_node</code></p>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/simon04/openstreetmap-website deduplicate_object_metadata</pre>
<p>Or view, comment on, or merge it at:</p>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/611'>https://github.com/openstreetmap/openstreetmap-website/pull/611</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>API: de-duplicate metadata code for n/w/r</li>
  <li>Move common metadata code to ObjectMetadata</li>
  <li>Move common metadata code to ObjectMetadata 2/2</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/611/files#diff-0">app/models/node.rb</a>
    (26)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/611/files#diff-1">app/models/old_node.rb</a>
    (29)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/611/files#diff-2">app/models/old_relation.rb</a>
    (28)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/611/files#diff-3">app/models/old_way.rb</a>
    (28)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/611/files#diff-4">app/models/relation.rb</a>
    (26)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/611/files#diff-5">app/models/way.rb</a>
    (26)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/611/files#diff-6">lib/object_metadata.rb</a>
    (31)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/611.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/611.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/611.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/611.diff</a></li>
</ul>