diff --git a/app/uploaders/gallery_uploader.rb b/app/uploaders/gallery_uploader.rb index 839cd9e..1b53d63 100644 --- a/app/uploaders/gallery_uploader.rb +++ b/app/uploaders/gallery_uploader.rb @@ -181,13 +181,14 @@ class GalleryUploader < CarrierWave::Uploader::Base if thumb_process_option == 0 thumb_process_option = OrbitHelper::SharedHash['gallery'][:thumb_process_option] end + resize_gravity = (now_album.resize_gravity rescue 'Center') case thumb_process_option when 1 - resize_and_pad(w, h, (transparent? ? :transparent : now_album.album_colors.first['color']), (now_album.resize_gravity rescue 'Center')) + resize_and_pad(w, h, (transparent? ? :transparent : now_album.album_colors.first['color']), resize_gravity) when 2 limit_process(w, h) when 3 - resize_to_fill(w, h) + resize_to_fill(w, h, resize_gravity) end end end