<p>This PR renames the old #read and #delete methods of the messages controller methods, to #show and #destroy respectively. This brings them into line with rails standard naming conventions, laying some groundwork for future resourceful routing.</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 some more translation key renaming, namely:</p>
<ul>
<li><code>messages.read.*</code> becomes <code>messages.show.*</code></li>
<li><code>messages.show.delete_button</code> then becomes <code>messages.show.destroy_button</code></li>
<li><code>messages.sent_message_summary.delete_button</code> becomes <code>messages.sent_message_summary.destroy_button</code></li>
<li><code>messages.message_summary.delete_button</code> becomes <code>messages.message_summary.destroy_button</code></li>
<li><code>messages.delete.deleted</code> becomes <code>messages.destroy.destroyed</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/1863'>https://github.com/openstreetmap/openstreetmap-website/pull/1863</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Remove unused POST method for message replies</li>
<li>Rename messages#delete to destroy</li>
<li>Rename messages#read to #show</li>
<li>Ensure database is writable before destroying a message</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-0">app/controllers/messages_controller.rb</a>
(12)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-1">app/models/notifier.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-2">app/views/messages/_message_summary.html.erb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-3">app/views/messages/_sent_message_summary.html.erb</a>
(4)
</li>
<li>
<strong>R</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-4">app/views/messages/destroy.js.erb</a>
(0)
</li>
<li>
<strong>R</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-5">app/views/messages/show.html.erb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-6">config/locales/en.yml</a>
(12)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-7">config/routes.rb</a>
(6)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-8">test/controllers/messages_controller_test.rb</a>
(62)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1863.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/1863.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1863.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/1863.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/1863">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLXQOacSOpyK1OgsUp_gtlDVHx-VJks5tyrHlgaJpZM4T_T8E">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLco0oBEmeIOa-4Tr4yM8zxNg6j1Mks5tyrHlgaJpZM4T_T8E.gif" height="1" width="1" alt="" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/pull/1863"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>
<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://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Messages controller method renaming for show and destroy (#1863)"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1863"}}}</script>
<script type="application/ld+json">{"@type":"MessageCard","@context":"http://schema.org/extensions","hideOriginalBody":"false","originator":"37567f93-e2a7-4e2a-ad37-a9160fc62647","title":"Messages controller method renaming for show and destroy (#1863)","sections":[{"text":"","activityTitle":"**Andy Allan**","activityImage":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","activitySubtitle":"@gravitystorm","facts":[]},{"title":"Commit Summary","facts":[{"name":"40cab84","value":"Remove unused POST method for message replies"},{"name":"73df844","value":"Rename messages#delete to destroy"},{"name":"4ec70f7","value":"Rename messages#read to #show"},{"name":"84fa437","value":"Ensure database is writable before destroying a message"}]},{"title":"File Changes","facts":[{"name":"Modified","value":"[app/controllers/messages_controller.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-0) (12 changes)"},{"name":"Modified","value":"[app/models/notifier.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-1) (2 changes)"},{"name":"Modified","value":"[app/views/messages/_message_summary.html.erb](https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-2) (4 changes)"},{"name":"Modified","value":"[app/views/messages/_sent_message_summary.html.erb](https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-3) (4 changes)"},{"name":"Renamed","value":"[app/views/messages/destroy.js.erb](https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-4) (0 changes)"},{"name":"Renamed","value":"[app/views/messages/show.html.erb](https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-5) (2 changes)"},{"name":"Modified","value":"[config/locales/en.yml](https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-6) (12 changes)"},{"name":"Modified","value":"[config/routes.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-7) (6 changes)"},{"name":"Modified","value":"[test/controllers/messages_controller_test.rb](https://github.com/openstreetmap/openstreetmap-website/pull/1863/files#diff-8) (62 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":"{\"commandName\":\"IssueComment\",\"repositoryFullName\":\"openstreetmap/openstreetmap-website\",\"issueId\":1863,\"IssueComment\":\"{{IssueComment.value}}\"}"}]},{"name":"Close pull request","@type":"HttpPOST","target":"https://api.github.com","body":"{\"commandName\":\"PullRequestClose\",\"repositoryFullName\":\"openstreetmap/openstreetmap-website\",\"pullRequestId\":1863}"},{"targets":[{"os":"default","uri":"https://github.com/openstreetmap/openstreetmap-website/pull/1863"}],"@type":"OpenUri","name":"View on GitHub"},{"targets":[{"os":"default","uri":"https://github.com/openstreetmap/openstreetmap-website/pull/1863.patch"}],"@type":"OpenUri","name":"View patch"},{"targets":[{"os":"default","uri":"https://github.com/openstreetmap/openstreetmap-website/pull/1863.diff"}],"@type":"OpenUri","name":"View diff"},{"name":"Unsubscribe","@type":"HttpPOST","target":"https://api.github.com","body":"{\"commandName\":\"MuteNotification\",\"threadId\":335363844}"}],"themeColor":"26292E"}</script>