Frage

Hi guys I am trying to learn the sinatra framework and would like to use it as the backend for simple web services. I am also attempting to get my hands dirty with no-sequel solutions and for some reasons decided to learn to work with redis. As for the ruby library to be used I have selected Ohm since it seems like a minimal, no fuss library that I could easily use.

However, looking around and researching, I cannot find sample implementation where there is pagination for Ohm. I have also read a bit and redis and I know that you can specify ranges in the query. The question is, how do I use this with the Ohm ruby library?

Any help or any guide would be greatly appreciated.

War es hilfreich?

Lösung

Last time I wanted that combination I found this here: https://github.com/sinefunc/pagination

Otherwise use https://github.com/mislav/will_paginate whcih will not work with ohm though but you can use datamapper with redis.

If you want to use mongodb you could use mongomapper which has pagination built in but then that is a completely different situation.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top