File: //usr/local/rvm/gems/ruby-2.7.4/doc/activerecord-6.1.4.1/ri/ActiveRecord/FinderMethods/first-i.ri
U:RDoc::AnyMethod[iI"
first:ETI"&ActiveRecord::FinderMethods#first;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"LFind the first record (or first N records if a parameter is supplied). ;TI"9If no order is defined it will order by primary key.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [
I"hPerson.first # returns the first object fetched by SELECT * FROM people ORDER BY people.id LIMIT 1
;TI"6Person.where(["user_name = ?", user_name]).first
;TI">Person.where(["user_name = :u", { u: user_name }]).first
;TI"5Person.order("created_on DESC").offset(5).first
;TI"qPerson.first(3) # returns the first three objects fetched by SELECT * FROM people ORDER BY people.id LIMIT 3;T:@format0:
@fileI"1lib/active_record/relation/finder_methods.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(limit = nil);T@FI"FinderMethods;TcRDoc::NormalModule00