Class: Mokio::ThumbUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Includes:
Uploader::Asset
Defined in:
app/uploaders/mokio/thumb_uploader.rb

Instance Method Summary collapse

Methods included from Uploader::Asset

included, #store_dir

Instance Method Details

#extension_white_listObject

Add a white list of extensions which are allowed to be uploaded. For images you might use something like this:



11
12
13
# File 'app/uploaders/mokio/thumb_uploader.rb', line 11

def extension_white_list
  %w(jpg jpeg gif png)
end

#is_new?(image) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'app/uploaders/mokio/thumb_uploader.rb', line 5

def is_new? image
  model.thumb.blank?
end