I have a pagination system that works in a standard sort of way: i get
the items (“articles” in this case) on a given page by saying
Article.find(
:all,
:order => “points DESC, added_at DESC”,
:limit => items_per_page,
:offset => offset
)
But now i want to do the reverse - given an article_id, how do i get the
page with that article? I’m sure this is some simple sql thing but i
can’t figure it out.
thanks in advance
max