diff --git a/app/controllers/galleries_controller.rb b/app/controllers/galleries_controller.rb index 9d51c4f..0378011 100644 --- a/app/controllers/galleries_controller.rb +++ b/app/controllers/galleries_controller.rb @@ -77,7 +77,7 @@ class GalleriesController < ApplicationController end def widget tags = OrbitHelper.widget_tags.empty? ? ["all"] : OrbitHelper.widget_tags - album_ids = Album.filter_by_widget_categories.filter_by_tags(tags).pluck(:id) + album_ids = Album.filter_by_widget_categories(OrbitHelper.widget_categories,false).filter_by_tags(tags).pluck(:id) params = OrbitHelper.params counts = OrbitHelper.widget_data_count images = AlbumImage.where({album_id:{"$in"=>album_ids}}).desc(:id).limit(counts *5).sample(counts)