Sha256: 0061f275984afd3f2fc28e159b3d3d20021fa44a138a2b2db3aeb7b6df2a5b16
Contents?: true
Size: 598 Bytes
Versions: 11
Compression:
Stored size: 598 Bytes
Contents
module Mokio class DataFileUploader < CarrierWave::Uploader::Base include Mokio::Uploader::Asset process :watermark => Mokio.watermark_path, :if => :create_watermark? protected def create_watermark? image Mokio.enable_watermark end def watermark(path_to_file) manipulate! do |img| img = img.composite(MiniMagick::Image.open(path_to_file), "jpg") do |c| c.gravity "SouthEast" end end end def picgallery? image Content.find(model.content_id).type == "PicGallery" end end end
Version data entries
11 entries across 11 versions & 1 rubygems