Class: AvatarUploader

Inherits:
BaseUploader
  • Object
show all
Defined in:
app/uploaders/avatar_uploader.rb

Instance Method Summary collapse

Methods inherited from BaseUploader

#default_url, #store_dir

Instance Method Details

#extension_white_listObject


24
25
26
# File 'app/uploaders/avatar_uploader.rb', line 24

def extension_white_list
  %w(jpg jpeg png)
end

#filenameObject


18
19
20
21
22
# File 'app/uploaders/avatar_uploader.rb', line 18

def filename
  if super.present?
    "avatar/#{model.id}.jpg"
  end
end