<p><b>@tomhughes</b> requested changes on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1883#discussion_r191072099">app/controllers/user_controller.rb</a>:</p>
<pre style='color:#555'>> @@ -126,6 +126,7 @@ def account
(params[:user][:auth_provider] == current_user.auth_provider &&
params[:user][:auth_uid] == current_user.auth_uid)
update_user(current_user, params)
+ @title = t "user.account.title"
</pre>
<p>Would it not be more sensible just to move setting of the title to later in the method rather than duplicating it here?</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1883#discussion_r191072113">app/controllers/user_controller.rb</a>:</p>
<pre style='color:#555'>> @@ -712,6 +713,7 @@ def update_user(user, params)
end
if user.save
+ @preferred_languages = current_user.preferred_languages
</pre>
<p>What is this doing? Does anything actually use that member of the controller?</p>
<p>Was it an early attempt to reset the cache on the model that has since been replaced with the change in the model?</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1883#discussion_r191072147">app/models/user.rb</a>:</p>
<pre style='color:#555'>> @@ -189,7 +189,7 @@ def preferred_language
end
def preferred_languages
- @preferred_languages ||= Locale.list(languages)
+ Locale.list(languages)
</pre>
<p>Rather than just getting rid of the memoization maybe we should use an <code>after_save</code> filter to set it to <code>nil</code> so that it will be recomputed on next read?</p>
<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/1883#pullrequestreview-123579345">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLZsFAVNNtOBbfxBll2i5VTTNreOMks5t2oHKgaJpZM4UPGb0">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLeMrbvv-F4QPhBzFMYcKsTwiStKHks5t2oHKgaJpZM4UPGb0.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/1883#pullrequestreview-123579345","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1883#pullrequestreview-123579345","name":"View Pull Request"},"description":"View this Pull Request on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}}</script>
<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":"PERSON","message":"@tomhughes requested changes on #1883"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1883#pullrequestreview-123579345"}}}</script>
<script type="application/ld+json">{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "37567f93-e2a7-4e2a-ad37-a9160fc62647",
"title": "@tomhughes requested changes on 1883",
"sections": [
{
"text": "",
"activityTitle": "**Tom Hughes**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@tomhughes",
"facts": [
]
}
],
"potentialAction": [
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/1883#pullrequestreview-123579345"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 339502836\n}"
}
],
"themeColor": "26292E"
}</script>