Rails and image gallery: how to make it flexible?
Posted
by user305270
on Stack Overflow
See other posts from Stack Overflow
or by user305270
Published on 2010-04-02T11:30:20Z
Indexed on
2010/04/02
11:33 UTC
Read the original article
Hit count: 300
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
© Stack Overflow or respective owner