I need to solve a bug with my website http://www.fotokio.com/.
Right now the application shows best images of today, yesterday and 3 days before:
"@firstday = 0
@images = Image.top_of_day(@firstday).limit(MAX_IMAGES).all.to_a
@images = Image.top_of_day(@firstday + 1).limit(MAX_IMAGES).all.to_a
@images = Image.top_of_day(@firstday + 2).limit(MAX_IMAGES).all.to_a
@images = Image.top_of_day(@firstday + @page).limit(MAX_IMAGES).all.to_a
-If I don't upload images in 3 days that reached a popular status then the index just show an empty page.
-The idea of the application is being able to scroll down and seeing galleries until the first day images were uploaded. Nevertheless when I skip a day uploading images then I can only scroll untill reaching that day (I can not continue to scroll down and see previous days popular images)
-The same problem described above also happens with the mini-gallery http://snag.gy/MXZv3.jpg If skip a day then I can only browse in the mini-gallery to the day skipped (the idea with the minigallery is also to being able to browse it continually until the first image ever uploaded that reached popularity)
THE SOLUTION I EXPECT
-The index always shows the three galleries of the last days images were uploaded and reached popularity (ex. If users only upload images three times in a year show those three days popular images)
-Users always being able to scroll down and see images of past days until the reaching the first day the application started (even if in various days images are not uploaded)
--Users always being able browse mini-gallery and see previous images until reaching the first image to reach popularity ever (even if in various days images are not uploaded)