Sha256: 652c268764af1424b5877d6b925d64e5c7ec2cb82ea41f7261c2820e1dee2e1a

Contents?: true

Size: 406 Bytes

Versions: 10

Compression:

Stored size: 406 Bytes

Contents

class LogoUploader < BaseUploader
  self.specified_dimensions = proc { Array.new(2, E9::Config[:e9_vendors_logo_size]) }

  process :convert        => :png
  process :resize_to_fill => specified_dimensions if specified_dimensions?

  def filename
    "#{model.class.to_s.underscore}_logo.png" if present?
  end

  def default_url
    File.join(host, DEFAULTS_BASE_PATH, "upload_image_thumb.png")
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
e9_vendors-0.0.10 app/uploaders/logo_uploader.rb
e9_vendors-0.0.9 app/uploaders/logo_uploader.rb
e9_vendors-0.0.8 app/uploaders/logo_uploader.rb
e9_vendors-0.0.7 app/uploaders/logo_uploader.rb
e9_vendors-0.0.6 app/uploaders/logo_uploader.rb
e9_vendors-0.0.5 app/uploaders/logo_uploader.rb
e9_vendors-0.0.4 app/uploaders/logo_uploader.rb
e9_vendors-0.0.3 app/uploaders/logo_uploader.rb
e9_vendors-0.0.2 app/uploaders/logo_uploader.rb
e9_vendors-0.0.1 app/uploaders/logo_uploader.rb