Class: Mokio::MainPicUploader
- Inherits:
-
CarrierWave::Uploader::Base
- Object
- CarrierWave::Uploader::Base
- Mokio::MainPicUploader
- Includes:
- Uploader::Asset
- Defined in:
- app/uploaders/mokio/main_pic_uploader.rb
Instance Method Summary collapse
-
#extension_white_list ⇒ Object
Add a white list of extensions which are allowed to be uploaded.
- #picgallery?(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:
19 20 21 |
# File 'app/uploaders/mokio/main_pic_uploader.rb', line 19 def extension_white_list %w(jpg jpeg gif png) end |
#picgallery?(image) ⇒ Boolean
13 14 15 |
# File 'app/uploaders/mokio/main_pic_uploader.rb', line 13 def picgallery? image model.type == "PicGallery" if model.respond_to?(:type) end |