Sha256: fa6f383ce926184dd45ae311162bf9794d018ed5069e2d3415ccec774df20598

Contents?: true

Size: 544 Bytes

Versions: 9

Compression:

Stored size: 544 Bytes

Contents

class CkeditorPictureUploader < CarrierWave::Uploader::Base
  include Ckeditor::Backend::CarrierWave
  include CarrierWave::MiniMagick

  def store_dir
    Rails.env.test? ? "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" : "#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
  end

  process :read_dimensions

  version :thumb do
    process :resize_to_fill => [118, 100]
  end

  version :content do
    process :resize_to_limit => [800, 800]
  end

  def extension_white_list
    Ckeditor.image_file_types
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blog_logic-1.4.15 app/uploaders/ckeditor_picture_uploader.rb
blog_logic-1.4.14 app/uploaders/ckeditor_picture_uploader.rb
blog_logic-1.4.13 app/uploaders/ckeditor_picture_uploader.rb
blog_logic-1.4.12 app/uploaders/ckeditor_picture_uploader.rb
blog_logic-1.4.11 app/uploaders/ckeditor_picture_uploader.rb
blog_logic-1.4.10 app/uploaders/ckeditor_picture_uploader.rb
blog_logic-1.4.9 app/uploaders/ckeditor_picture_uploader.rb
blog_logic-1.4.8 app/uploaders/ckeditor_picture_uploader.rb
blog_logic-1.4.7 app/uploaders/ckeditor_picture_uploader.rb