tags are now working for gallery

This commit is contained in:
harrybomrah committed 2016-01-15 16:01:39 +08:00
1 parent 4d1ab7a226
commit b6bb20d66a
1 file changed
+3 -2
+3 -2
View File
@@ -1,6 +1,6 @@
class GalleriesController < ApplicationController
def index
albums = Album.filter_by_categories.asc(:order)
albums = Album.filter_by_categories.filter_by_tags.asc(:order)
galleries = albums.collect do |a|
alt_text = (a.description.nil? || a.description == "" ? "gallery image" : a.description)
{
@@ -38,7 +38,8 @@ class GalleriesController < ApplicationController
end
def widget
albums = Album.filter_by_widget_categories
tags = OrbitHelper.widget_tags.empty? ? ["all"] : OrbitHelper.widget_tags
albums = Album.filter_by_widget_categories.filter_by_tags(tags)
params = OrbitHelper.params
counts = OrbitHelper.widget_data_count