File: //usr/local/rvm/gems/ruby-2.5.9/doc/activerecord-6.1.4.1/ri/ActiveRecord/Calculations/pick-i.ri
U:RDoc::AnyMethod[iI" pick:ETI"$ActiveRecord::Calculations#pick;TF:publico:RDoc::Markup::Document:@parts[
o:RDoc::Markup::Paragraph; [I"IPick the value(s) from the named column(s) in the current relation. ;TI"kThis is short-hand for <tt>relation.limit(1).pluck(*column_names).first</tt>, and is primarily useful ;TI"Kwhen you have a relation that's already narrowed down to a single row.;To:RDoc::Markup::BlankLine o;
; [I"iJust like #pluck, #pick will only load the actual value, not the entire record object, so it's also ;TI"Vmore efficient. The value is, again like with pluck, typecast by the column type.;T@o:RDoc::Markup::Verbatim; [I"%Person.where(id: 1).pick(:name)
;TI";# SELECT people.name FROM people WHERE id = 1 LIMIT 1
;TI"# => 'David'
;TI"
;TI"5Person.where(id: 1).pick(:name, :email_address)
;TI"Q# SELECT people.name, people.email_address FROM people WHERE id = 1 LIMIT 1
;TI"/# => [ 'David', 'david@loudthinking.com' ];T:@format0:
@fileI"/lib/active_record/relation/calculations.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*column_names);T@FI"Calculations;TcRDoc::NormalModule00