Sha256: 450b339fa6c4c9cdc1373ff4a16a225e9685eb83d8e3ce71470445f8e2f38d62
Contents?: true
Size: 625 Bytes
Versions: 1
Compression:
Stored size: 625 Bytes
Contents
module TheStoragesImageProcessor def rotate_left attached_file = AttachedFile.where(id: params[:id]).first attached_file.rotate_left redirect_to [request.referer, :files].join('#') end def rotate_right attached_file = AttachedFile.where(id: params[:id]).first attached_file.rotate_right redirect_to [request.referer, :files].join('#') end def crop_image x = params attached_file = AttachedFile.where(id: x[:image_id]).first attached_file.crop_image(:main_preview, x[:x], x[:y], x[:w], x[:h], x[:img_w]) render text: attached_file.url(:main_preview, nocache: true) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
the_storages-0.0.2 | app/controllers/concerns/the_storages_image_processor.rb |