Class: Archangel::AvatarUploader

Inherits:
ApplicationUploader show all
Defined in:
app/uploaders/archangel/avatar_uploader.rb

Overview

Avatar uploader

Instance Method Summary collapse

Methods inherited from ApplicationUploader

#default_url, #extension_whitelist, #image?, #store_dir

Instance Method Details

#default_pathString

Uploaded path for file


31
32
33
# File 'app/uploaders/archangel/avatar_uploader.rb', line 31

def default_path
  "archangel/fallback/" + [version_name, "avatar.png"].compact.join("_")
end

#filenameString

Uploaded file name


40
41
42
# File 'app/uploaders/archangel/avatar_uploader.rb', line 40

def filename
  "avatar.#{file.extension}" if original_filename.present?
end