Class: Mokio::ThumbUploader
- Inherits:
-
CarrierWave::Uploader::Base
- Object
- CarrierWave::Uploader::Base
- Mokio::ThumbUploader
- Includes:
- Uploader::Asset
- Defined in:
- app/uploaders/mokio/thumb_uploader.rb
Instance Method Summary collapse
-
#extension_white_list ⇒ Object
Add a white list of extensions which are allowed to be uploaded.
- #is_new?(image) ⇒ Boolean
Methods included from Uploader::Asset
Instance Method Details
#extension_white_list ⇒ Object
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
5 6 7 |
# File 'app/uploaders/mokio/thumb_uploader.rb', line 5 def is_new? image model.thumb.blank? end |