[openstreetmap/openstreetmap-website] Use resourceful route for user status (PR #5437)

Anton Khorev notifications at github.com
Mon Dec 23 03:06:41 UTC 2024


Creates `:user_status` resource with its own controller. You can `:update` this resource instead of doing `:set_status` on `User`.

"Soft destroy" `:destroy` action is also moved to this resource because it comes together with status update. It does a similar thing (changes status), has the same permissions (admin), is linked from the same place in the UI.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Use resourceful route for user status

-- File Changes --

    M app/abilities/ability.rb (3)
    A app/controllers/users/statuses_controller.rb (42)
    M app/controllers/users_controller.rb (28)
    M app/views/users/show.html.erb (20)
    M config/routes.rb (4)
    A test/controllers/users/statuses_controller_test.rb (68)
    M test/controllers/users_controller_test.rb (59)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/5437 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241222/3b78a328/attachment.htm>


More information about the rails-dev mailing list