[openstreetmap/openstreetmap-website] Re-arrange login and signup screens as discussed in #4128 (PR #4455)
Milan Cvetkovic
notifications at github.com
Thu Jan 11 18:41:26 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
Ok, so I merged back two actions into one. This results in less repetitions in controller actions and the string resources at the price of somewhat complex `users/new.html.erb`,
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4455#discussion_r1449259682
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4455/review/1816289360 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240111/50a53002/attachment.htm>
More information about the rails-dev
mailing list