My app has Photos that belong to Users.
In a photo#show view I'd like to show "More from this user", and show a next and previous photo from that user. I would be fine with these being the next/previous photo in id
order or the next/previous photo in created_at
order.
How would you write that kind of query for one next / previous photo, or for multiple next / previous photos?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…