Skip to content

Instantly share code, notes, and snippets.

@tameem92
Created December 26, 2019 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tameem92/d219ccc9745d4bd11a7f7da9f8d743f6 to your computer and use it in GitHub Desktop.
Save tameem92/d219ccc9745d4bd11a7f7da9f8d743f6 to your computer and use it in GitHub Desktop.
# Benchmark both methods because in some cases pluck
# is faster than a select & map.
Category.select(:type)
Category.pluck(:type)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment