This commit is contained in:
Harry Bomrah 2014-06-18 19:56:12 +08:00
parent 4a31aa9d29
commit f24079b90d
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
class GalleriesController < ApplicationController class GalleriesController < ApplicationController
def index 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-name" => a.name,
"album-description" => a.description, "album-description" => a.description,
@ -9,7 +10,7 @@ class GalleriesController < ApplicationController
} }
end end
{ {
"albums" => albums, "albums" => galleries,
"extras" => {"widget-title"=>"Gallery"}, "extras" => {"widget-title"=>"Gallery"},
"total_pages" => albums.total_pages "total_pages" => albums.total_pages
} }