1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/fixtures/topics.yml
Jason Meller cafe31a078 Ensure #second acts like #first AR finder
This commit bring the famous ordinal Array instance methods defined
in ActiveSupport into ActiveRecord as fully-fledged finders.

These finders ensure a default ascending order of the table's primary
key, and utilize the OFFSET SQL verb to locate the user's desired
record. If an offset is defined in the query, calling #second adds
to the offset to get the actual desired record.

Fixes #13743.
2014-01-20 16:58:18 -05:00

49 lines
1,012 B
YAML

first:
id: 1
title: The First Topic
author_name: David
author_email_address: david@loudthinking.com
written_on: 2003-07-16t15:28:11.2233+01:00
last_read: 2004-04-15
bonus_time: 2005-01-30t15:28:00.00+01:00
content: Have a nice day
approved: false
replies_count: 1
second:
id: 2
title: The Second Topic of the day
author_name: Mary
written_on: 2004-07-15t15:28:00.0099+01:00
content: Have a nice day
approved: true
replies_count: 0
parent_id: 1
type: Reply
third:
id: 3
title: The Third Topic of the day
author_name: Carl
written_on: 2012-08-12t20:24:22.129346+00:00
content: I'm a troll
approved: true
replies_count: 1
fourth:
id: 4
title: The Fourth Topic of the day
author_name: Carl
written_on: 2006-07-15t15:28:00.0099+01:00
content: Why not?
approved: true
type: Reply
parent_id: 3
fifth:
id: 5
title: The Fifth Topic of the day
author_name: Jason
written_on: 2013-07-13t12:11:00.0099+01:00
content: Omakase
approved: true