[openstreetmap/openstreetmap-website] Separate forms for preferences and profile (#3257)
Andy Allan
notifications at github.com
Wed Jul 21 17:49:59 UTC 2021
@gravitystorm 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(",")
I just pushed a fix for this using `flash[:notice] = t(".success", :locale => Locale.available.preferred(Locale.list(current_user.languages)))` but I've just realised that a much better approach would be to use the "flash partials" approach from #3232 so give me a moment to refactor.
--
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_r674204531
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210721/bf9c282d/attachment.htm>
More information about the rails-dev
mailing list