<p></p>
<p><b>@gravitystorm</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3257#discussion_r674204531">app/controllers/preferences_controller.rb</a>:</p>
<pre style='color:#555'>> +  layout "site"
+
+  before_action :authorize_web
+  before_action :set_locale
+
+  authorize_resource :class => false
+
+  before_action :check_database_readable
+  before_action :check_database_writable, :only => [:update]
+
+  def show; end
+
+  def edit; end
+
+  def update
+    current_user.languages = params[:user][:languages].split(",")
</pre>
<p>I just pushed a fix for this using <code>flash[:notice] = t(".success", :locale => Locale.available.preferred(Locale.list(current_user.languages)))</code> but I've just realised that a much better approach would be to use the "flash partials" approach from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="928571655" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/3232" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/3232/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/3232">#3232</a> so give me a moment to refactor.</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/3257#discussion_r674204531">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNNGW3NKDH2H24NKDTTY4CEPANCNFSM5AL23W7Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLMXZSLSSW5ZZC54BGLTY4CEPA5CNFSM5AL23W72YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFJYAHII.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/3257#discussion_r674204531",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3257#discussion_r674204531",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>