From f24079b90d29c8c542f436ee4f99ee563b45a6fb Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 18 Jun 2014 19:56:12 +0800 Subject: [PATCH] bug fix --- app/controllers/galleries_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/galleries_controller.rb b/app/controllers/galleries_controller.rb index 3d4dc83..9c27f5f 100644 --- a/app/controllers/galleries_controller.rb +++ b/app/controllers/galleries_controller.rb @@ -1,6 +1,7 @@ class GalleriesController < ApplicationController def index - albums = Album.filter_by_categories.collect do |a| + albums = Album.filter_by_categories + galleries = albums.collect do |a| { "album-name" => a.name, "album-description" => a.description, @@ -9,7 +10,7 @@ class GalleriesController < ApplicationController } end { - "albums" => albums, + "albums" => galleries, "extras" => {"widget-title"=>"Gallery"}, "total_pages" => albums.total_pages }