<p>This PR contains some refactoring of diary entries, to use <code>:create</code> and <code>:update</code> methods separate from the <code>:new</code> and <code>:edit</code> methods. The routes are also partially refactored to use resources, and various path names are therefore adjusted.</p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?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 i18n key renames:</p>
<ul>
<li>diary_entries.new.publish_button -> helpers.submit.diary_entry.create</li>
<li>diary_entries.edit.subject -> diary_entries.form.subject</li>
<li>diary_entries.edit.body -> diary_entries.form.body</li>
<li>diary_entries.edit.language -> diary_entries.form.language</li>
<li>diary_entries.edit.location -> diary_entries.form.location</li>
<li>diary_entries.edit.latitude -> diary_entries.form.latitude</li>
<li>diary_entries.edit.longitude -> diary_entries.form.longitude</li>
<li>diary_entries.edit.use_map_link -> diary_entries.form.use_map_link</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/2238'>https://github.com/openstreetmap/openstreetmap-website/pull/2238</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Refactor diary entries to use create and update methods</li>
<li>Refactor some diary entry routes to use resources</li>
<li>Refactor diary entry form</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-0">app/abilities/ability.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-1">app/controllers/diary_entries_controller.rb</a>
(62)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-2">app/views/diary_entries/_form.html.erb</a>
(35)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-3">app/views/diary_entries/edit.html.erb</a>
(42)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-4">app/views/diary_entries/index.html.erb</a>
(4)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-5">app/views/diary_entries/new.html.erb</a>
(13)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-6">app/views/layouts/_header.html.erb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-7">app/views/site/about.html.erb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-8">app/views/users/show.html.erb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-9">config/locales/en.yml</a>
(24)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-10">config/routes.rb</a>
(15)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-11">test/controllers/diary_entries_controller_test.rb</a>
(48)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-12">test/controllers/users_controller_test.rb</a>
(14)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-13">test/integration/user_diaries_test.rb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2238/files#diff-14">test/system/diary_entry_test.rb</a>
(2)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2238.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2238.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2238.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2238.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/2238?email_source=notifications&email_token=AAK2OLMAXC76ODLTGSVH5V3PX2GPDA5CNFSM4HQNKIHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWP74KA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPOLE7AMMF6MFYWL3TPX2GPDANCNFSM4HQNKIHA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLMMOOZHEWZ6LPWXOQ3PX2GPDA5CNFSM4HQNKIHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWP74KA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2238?email_source=notifications\u0026email_token=AAK2OLMAXC76ODLTGSVH5V3PX2GPDA5CNFSM4HQNKIHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWP74KA",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2238?email_source=notifications\u0026email_token=AAK2OLMAXC76ODLTGSVH5V3PX2GPDA5CNFSM4HQNKIHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWP74KA",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>