Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby pluck

Use #pluck as a shortcut to select one or more attributes without loading a bunch
of records just to grab the attributes you want.
Use:
	Person.pluck(:name)
intead of:
	Person.all.map(&:name)
Source by apidock.com #
 
PREVIOUS NEXT
Tagged: #ruby #pluck
ADD COMMENT
Topic
Name
7+9 =