HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/gems/ruby-2.7.4/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::BlankLineo;
;	[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