conditional convert options paperclip

后端 未结 5 1446
[愿得一人]
[愿得一人] 2021-02-06 09:18

After some research I was able to add styles based on my image_class column.

Model.rb

has_attached_file :image,
                    


        
5条回答
  •  借酒劲吻你
    2021-02-06 10:13

    Apply it to all since that's what you're doing anyway?

    :convert_options => {:all => "-flop"}
    

    failing that you might be looking at creating a Paperclip Processor

提交回复
热议问题