diff --git a/app/controllers/galleries_controller.rb b/app/controllers/galleries_controller.rb index 1840757..bf6fa04 100644 --- a/app/controllers/galleries_controller.rb +++ b/app/controllers/galleries_controller.rb @@ -1,6 +1,12 @@ class GalleriesController < ApplicationController def index - albums = Album.filter_by_categories + # albums = Album.filter_by_categories + + params = OrbitHelper.params + + albums = Album.filter_by_categories([],false).filter_by_tags.sample(OrbitHelper.page_data_count) + albums = Kaminari.paginate_array(albums).page(params[:page]).per(OrbitHelper.page_data_count) + galleries = albums.collect do |a| { "album-name" => a.name,