News for hackers. Stuff that matters.
Re:Everyday performance rules for Ruby on Rails developers by durkie on Thursday December 07, 2023 @10:51AM (#38557711)
That's correct. If i run `User.limit(5).pluck(:id)` the query it runs is `SELECT "users"."id" FROM "users" LIMIT $1 [["LIMIT", 5]]` and returns an array, not an ActiveRecord association
Re:Everyday performance rules for Ruby on Rails developers by hnatt on Friday December 08, 2023 @01:56AM (#38566156)
You can also do `User.limit(5).ids` which does the same thing.