Rails and image gallery: how to make it flexible?
- by user305270
Hy!
In my app, every profile has a gallery and this gallery has images. They can have 1 or 1000 images, so when i show up the gallery i only need a part of the images, let's say 12 images. Then in my ajax gallery when, someone requests more images are loaded.
This gallery is SEO, so, the main url is: "/profile-url/" and then, there are these urls too: "/profile-url/images/1" that loads the image with the id=1 in the database.
The gallery have to show only 6 images per stack, so When i request the page with the image.id=64, only have to show from 60 to 72, and to select the 64, that is done with js.
how may i add a request like this? and how to order them? thanks