This commit is contained in:
James Mason 2018-11-14 12:29:07 -08:00
parent ed22b62551
commit 9f84454a8d
2 changed files with 3 additions and 2 deletions

View file

@ -1313,6 +1313,7 @@ Style/RegexpLiteral:
Exclude:
- 'Guardfile'
- 'config/initializers/airbrake.rb'
- 'app/uploaders/picture_uploader.rb'
# Offense count: 2
# Cop supports --auto-correct.

View file

@ -84,12 +84,12 @@ class PictureUploader < CarrierWave::Uploader::Base
# Add a white list of extensions which are allowed to be uploaded.
# For images you might use something like this:
def extension_white_list
def extension_whitelist
%w(jpg jpeg gif png)
end
def content_type_whitelist
%r{/image\//}
/image\//
end
private