Does ActiveRecord offer a simple solution to get previous/next records
relative to a certain record? For instance, say I have this table:
PEOPLE
id | name
1 | john
2 | mary
3 | bob
Using p = Person.find(2), is it possible to get the previous (john)
and next (bob) records using perhaps something like p.previous and
p.next? If not, how can I do this without resorting to ugly queries?
Thanks in advance