[openstreetmap/openstreetmap-website] Separate forms for preferences and profile (#3257)

Tom Hughes notifications at github.com
Wed Jul 21 10:17:43 UTC 2021


@tomhughes commented on this pull request.



> +  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(",")

If that only needs the `set_locale` then I guess it might be reasonable but if it needs all the other nonsense you removed in that commit then probably not... I gave up even trying to understand the subtly of all that reset stuff.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3257#discussion_r673847384
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210721/906c246a/attachment-0001.htm>


More information about the rails-dev mailing list