Skip to content
Snippets Groups Projects
Commit f3e2b57b authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

Merge branch 'collection_thumbnails' into 'master'

Changed collection item thumbnails to show only not blank thumbnails

See merge request !363
parents 178c3d36 1f482d6b
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,11 @@ class CollectionSerializer < ActiveModel::Serializer
def items_thumbnails
thumbs = []
object.collection_items[0..3].each do | t |
thumbs << t.thumbnail
i = 0
while thumbs.size < 4 && i < object.collection_items.size do
t = object.collection_items[i].thumbnail
thumbs << t unless t.blank?
i=i+1
end
thumbs
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment