KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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?
Tags (comma-separated)
Save Edits
Cancel