Fix bug.
This commit is contained in:
parent
ec5de28e05
commit
692036531c
|
@ -174,12 +174,12 @@ class GalleryUploader < CarrierWave::Uploader::Base
|
||||||
def transparent?(*arg)
|
def transparent?(*arg)
|
||||||
now_id = model.album_id.to_s
|
now_id = model.album_id.to_s
|
||||||
now_album = Album.all.select { |value| (now_id==value.id.to_s)}[0]
|
now_album = Album.all.select { |value| (now_id==value.id.to_s)}[0]
|
||||||
now_album.album_colors.first['color']=='transparent' rescue false
|
now_album.album_colors.first['color']=='transparent' rescue true
|
||||||
end
|
end
|
||||||
def pad_process (w,h)
|
def pad_process (w,h)
|
||||||
now_id = model.album_id.to_s
|
now_id = model.album_id.to_s
|
||||||
now_album = Album.all.select { |value| (now_id==value.id.to_s)}[0]
|
now_album = Album.all.select { |value| (now_id==value.id.to_s)}[0]
|
||||||
resize_and_pad(w, h, (now_album.album_colors.first['color']=='transparent' ? :transparent : now_album.album_colors.first['color']), 'Center')
|
resize_and_pad(w, h, ((now_album.album_colors.first['color']=='transparent' rescue true) ? :transparent : now_album.album_colors.first['color']), 'Center')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue