[openstreetmap/openstreetmap-website] Separate `current_user` from @user (PR #7439)

Pablo Brasero notifications at github.com
Tue Sep 29 11:18:41 UTC 2026


As part of my work at https://github.com/openstreetmap/openstreetmap-website/pull/7427, I'll have to redefine how `current_user` is accessed.

One specific place where I've seen an issue is the users controller, where `current_user` serves a double purpose: the currently authenticated user and the new user that would be created in the `new`/`create` actions.

This PR separates the latter concept into `@user` to avoid confusion.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/7439

-- Commit Summary --

  * Separate `current_user` from @user

-- File Changes --

    M app/controllers/users_controller.rb (83)
    M app/views/users/new.html.erb (14)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/7439.patch
https://github.com/openstreetmap/openstreetmap-website/pull/7439.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7439
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7439 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260929/1633f08d/attachment.htm>


More information about the rails-dev mailing list