Flowdock
method

third

Importance_1
Ruby on Rails latest stable (v5.2.3) - 0 notes - Class: ActiveRecord::FinderMethods
third() public

Find the third record. If no order is defined it will order by primary key.

Person.third # returns the third object fetched by SELECT * FROM people
Person.offset(3).third # returns the third object from OFFSET 3 (which is OFFSET 5)
Person.where(["user_name = :u", { u: user_name }]).third
Show source
Register or log in to add new notes.