Fix gallery front end when display all categories

This commit is contained in:
Manson Wang 2013-11-14 10:34:18 +08:00
parent 9ea8b536b5
commit 827a5e52e7
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,10 @@
class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
def index def index
@albums = GalleryAlbum.where(:category_id.in => params[:category_id]) if params[:category_id].blank?
@albums = GalleryAlbum.where()
else
@albums = GalleryAlbum.where(:category_id.in => params[:category_id])
end
end end
def show def show