fix for widget
This commit is contained in:
parent
6da1ceb13f
commit
c98ceae1d6
|
@ -44,8 +44,10 @@ class GalleriesController < ApplicationController
|
|||
albums.each do |album|
|
||||
total_images = total_images + album.album_images.count
|
||||
end
|
||||
counts = counts > total_images ? counts : total_images
|
||||
while images.count < counts and images.count < AlbumImage.count
|
||||
counts = counts > total_images ? total_images : counts
|
||||
abc = AlbumImage.count
|
||||
counts = counts > abc ? abc : counts
|
||||
while images.count < counts
|
||||
albums.each do |album|
|
||||
img = album.album_images.sample
|
||||
if !images.include?(img) && img != nil
|
||||
|
|
Loading…
Reference in New Issue