[openstreetmap/openstreetmap-website] Replace lookup_user_by_id with load_resource (PR #4621)

Anton Khorev notifications at github.com
Mon Mar 25 03:48:18 UTC 2024


`.find(params[:id])` is exactly what CanCanCan's `load_resource` does:
https://github.com/CanCanCommunity/cancancan/blob/develop/docs/controller_helpers.md#authorize_resource-load_resource-load_and_authorize_resource
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Replace lookup_user_by_id with load_resource

-- File Changes --

    M app/controllers/api/users_controller.rb (10)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list