[openstreetmap/openstreetmap-website] Re-arrange login and signup screens as discussed in #4128 (PR #4455)
Milan Cvetkovic
notifications at github.com
Thu Jan 11 14:38:07 UTC 2024
@milan-cvetkovic commented on this pull request.
> + session[:referer] = safe_referer(params[:referer]) if params[:referer]
+
+ Rails.logger.info "create: #{session[:referer]}"
+
+ if current_user.invalid?
+ # Something is wrong with a new user, so rerender the form
+ render :action => "new"
+ else
+ # Save the user record
+ session[:new_user] = current_user.attributes.slice("email", "display_name", "pass_crypt", "consider_pd")
+ save_new_user
+ end
+ end
+ end
+
+ def new_association
One way to do this would be to merge those two actions back into one, but that would make merged erb template quite complex, maybe based on the presence of @auth_uid hidden field.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4455#discussion_r1448959844
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4455/review/1815750498 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240111/9945649f/attachment.htm>
More information about the rails-dev
mailing list