Skip to content

A Ruby gem for Rails that enhances the `pluck` function to select multiple columns

License

Notifications You must be signed in to change notification settings

jzaleski/multipluck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multipluck

Build Status Dependency Status

A Ruby gem for Rails that enhances the pluck function to select multiple columns

Usage

# Fetch all user ids and names using var-args
User.pluck(:id, :name)
# => [[1, "Bob"], [2, "Simone"], ...]

# Fetch all user ids and names using an `Array` (legacy)
User.pluck([:id, :name])
# => [[1, "Bob"], [2, "Simone"], ...]

Contributing

  1. Fork it ( http://github.com/jzaleski/multipluck/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

A Ruby gem for Rails that enhances the `pluck` function to select multiple columns

Resources

License

Stars

Watchers

Forks

Packages