Simplest way to add a thumb size to a model using Paperclip in Rails -
i have rails model uses paperclip , has many thumb sizes. add new thumb size , generate size if possible - it unnecessary regenerate of old thumbs again. photo.find(123).photo.reprocess!(:new_size) perfect unfortunately doesn't exist. know simple way achieve this?
thanks.
the thumb-size can set in model of pictures (see paperclip):
class user < activerecord::base has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" } end
as far remember should possible regenerate deleting old thumbnails. however, there's rake-task it:
rake paperclip:refresh class=yourmodelname
Comments
Post a Comment