Sha256: d30262af34392246dee4f416ebb1746acec3223889ff6d5bf646d22760ccd54e

Contents?: true

Size: 686 Bytes

Versions: 10

Compression:

Stored size: 686 Bytes

Contents

# -*- encoding : utf-8 -*-

module LoyalCore
  class AvatarUploader < ::LoyalCore::AssetUploader
    include ::CarrierWave::MiniMagick

    # 只能上传图片
    def extension_white_list
      LOYAL_CORE_UPLOADER_IMAGE_EXT
    end

    version :medium do
      process :resize_to_fill => [360, 360]
    end

    version :small do
      process :resize_to_fill => [180, 180]
    end

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

    version :mini do
      process :resize_to_fill => [50, 50]
    end

    version :tiny do
      process :resize_to_fill => [32, 32]
    end

    version :ico do
      process :resize_to_fill => [16, 16]
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
loyal_core-0.0.11 app/uploaders/loyal_core/avatar_uploader.rb
loyal_core-0.0.10 app/uploaders/loyal_core/avatar_uploader.rb
loyal_core-0.0.8 app/uploaders/loyal_core/avatar_uploader.rb
loyal_core-0.0.7 app/uploaders/loyal_core/avatar_uploader.rb
loyal_core-0.0.6 app/uploaders/loyal_core/avatar_uploader.rb
loyal_core-0.0.5 app/uploaders/loyal_core/avatar_uploader.rb
loyal_core-0.0.4 app/uploaders/loyal_core/avatar_uploader.rb
loyal_core-0.0.3 app/uploaders/loyal_core/avatar_uploader.rb
loyal_core-0.0.2 app/uploaders/loyal_core/avatar_uploader.rb
loyal_core-0.0.1 app/uploaders/loyal_core/avatar_uploader.rb