[openstreetmap/openstreetmap-website] Select user ids from reports using pluck (PR #5578)

Anton Khorev notifications at github.com
Wed Jan 29 16:14:05 UTC 2025


#4990 added the *Reporter Users* column. It uses reports to sort the users, but actually all it needs to get from the db are user ids. The existing version with `map` fetches the entire report by doing `SELECT "reports".*`. Here I'm replacing it with `pluck` that does `SELECT "reports"."user_id"`.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Select user ids from reports using pluck

-- File Changes --

    M app/controllers/issues_controller.rb (2)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list