<p>This PR implements a few related changes to make traces resourceful, including renaming list->index, view->show and splitting edit into edit and update.</p>
<p>I put in redirects to handle the few people who might be editing trace details at the moment that this is deployed.</p>
<p><a class="user-mention" data-hovercard-user-id="1109395" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Nikerabbit">@Nikerabbit</a> this PR contains translation key renaming:</p>
<ul>
<li><code>traces.view.*</code> becomes <code>traces.show.*</code></li>
<li><code>traces.show.edit_track</code> and <code>traces.show.delete_track</code> become  <code>traces.show.edit_trace</code> and <code>traces.show.delete_trace</code> respectively</li>
<li><code>traces.list.*</code> becomes <code>traces.index.*</code></li>
</ul>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/1964'>https://github.com/openstreetmap/openstreetmap-website/pull/1964</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Split out updating a trace into an update action</li>
  <li>Rename traces#view to traces#show</li>
  <li>Rename traces#list to traces#index</li>
  <li>Rename i18n keys track->trace</li>
  <li>Put the resourceful routing at the top of the list, for clarity</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-0">app/controllers/api_controller.rb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-1">app/controllers/traces_controller.rb</a>
    (43)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-2">app/views/traces/_trace.html.erb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-3">app/views/traces/edit.html.erb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-4">app/views/traces/georss.rss.builder</a>
    (4)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-5">app/views/traces/index.html.erb</a>
    (4)
  </li>
  <li>
    <strong>R</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-6">app/views/traces/show.html.erb</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-7">app/views/user/view.html.erb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-8">config/locales/en.yml</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-9">config/routes.rb</a>
    (22)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-10">test/controllers/traces_controller_test.rb</a>
    (190)
  </li>
</ul>

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

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1964">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLTFDv8sGHQE9sDlTrL_TCXC81SUCks5uV1CJgaJpZM4WSrUc">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLSVeUMy4PjCG-HV2qGZhJO7RQ1TIks5uV1CJgaJpZM4WSrUc.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Refactor traces to be resourceful (#1964)"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1964"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/1964",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/1964",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Refactor traces to be resourceful (#1964)",
"sections": [
{
"text": "",
"activityTitle": "**Andy Allan**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@gravitystorm",
"facts": [

]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "b745126",
"value": "Split out updating a trace into an update action"
},
{
"name": "16fef14",
"value": "Rename traces#view to traces#show"
},
{
"name": "d0089f0",
"value": "Rename traces#list to traces#index"
},
{
"name": "4421777",
"value": "Rename i18n keys track-\u003etrace"
},
{
"name": "8a4405d",
"value": "Put the resourceful routing at the top of the list, for clarity"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Modified",
"value": "[app/controllers/api_controller.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-0) (2 changes)"
},
{
"name": "Modified",
"value": "[app/controllers/traces_controller.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-1) (43 changes)"
},
{
"name": "Modified",
"value": "[app/views/traces/_trace.html.erb](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-2) (4 changes)"
},
{
"name": "Modified",
"value": "[app/views/traces/edit.html.erb](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-3) (2 changes)"
},
{
"name": "Modified",
"value": "[app/views/traces/georss.rss.builder](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-4) (4 changes)"
},
{
"name": "Renamed",
"value": "[app/views/traces/index.html.erb](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-5) (4 changes)"
},
{
"name": "Renamed",
"value": "[app/views/traces/show.html.erb](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-6) (8 changes)"
},
{
"name": "Modified",
"value": "[app/views/user/view.html.erb](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-7) (2 changes)"
},
{
"name": "Modified",
"value": "[config/locales/en.yml](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-8) (12 changes)"
},
{
"name": "Modified",
"value": "[config/routes.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-9) (22 changes)"
},
{
"name": "Modified",
"value": "[test/controllers/traces_controller_test.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1964/files#diff-10) (190 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"openstreetmap/openstreetmap-website\",\n\"issueId\": 1964,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"openstreetmap/openstreetmap-website\",\n\"pullRequestId\": 1964\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/1964"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/1964.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/1964.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 373994780\n}"
}
],
"themeColor": "26292E"
}
]</script>