我想使用Paperclip在上传时剪裁图像,以从原始图片的中心获得方形拇指.我发现文档中的方法似乎完全符合我的要求:
transformation_to(dst,crop = false)
问题是我无法弄清楚在哪里使用这种方法.简单地将一些东西作为参数传递到这里会很棒:
has_attached_file :picture,
:styles => { :medium => "600x600>", :thumb => "something here" }