Simple cropping with Paperclip

Posted by collimarco on Stack Overflow See other posts from Stack Overflow or by collimarco
Published on 2009-06-19T11:42:23Z Indexed on 2010/03/24 1:23 UTC
Read the original article Hit count: 387

Filed under:
|
|
|

I would like to crop images on upload using Paperclip to get square thumbs from the center of the original picture. I find out a method in documentation that seems to do exactly what I want:

transformation_to(dst, crop = false)

The problem is that I can't figure out where to use this method. It would be great to simply pass something as a parameter here:

  has_attached_file :picture, 
                    :styles => { :medium => "600x600>", :thumb => "something here" }

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails