Compare commits
5 Commits
master
...
thumb_widt
Author | SHA1 | Date |
---|---|---|
JiangRu | 958e801fc7 | |
Harry Bomrah | 5f848cbffa | |
manson | 54b33b5fc3 | |
manson | a0768d5076 | |
manson | 5f5acf9b6d |
|
@ -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,
|
||||
|
|
|
@ -50,7 +50,7 @@ class GalleryUploader < CarrierWave::Uploader::Base
|
|||
# end
|
||||
|
||||
version :thumb do
|
||||
process :resize_to_fill => [200, 200]
|
||||
process :resize_to_limit => [200, nil]
|
||||
end
|
||||
|
||||
version :theater do
|
||||
|
|
Loading…
Reference in New Issue