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
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
}