Class: AvatarUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Includes:
UploaderHelper
Defined in:
app/uploaders/avatar_uploader.rb

Instance Method Summary collapse

Methods included from UploaderHelper

#file_storage?, #image?

Instance Method Details

#reset_events_cache(file) ⇒ Object


14
15
16
# File 'app/uploaders/avatar_uploader.rb', line 14

def reset_events_cache(file)
  model.reset_events_cache if model.is_a?(User)
end

#store_dirObject


10
11
12
# File 'app/uploaders/avatar_uploader.rb', line 10

def store_dir
  "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end