Merge branch 'master' into youtube-requests

This commit is contained in:
James Mason 2018-03-05 22:47:44 -08:00 committed by GitHub
commit 9bb9d954b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,7 +57,9 @@ module Admin
def mass_upload
errors = Commercial.read_file(params[:file]) if params[:file]
if errors.all? { |_k, v| v.blank? }
if !params[:file]
flash[:error] = 'Empty file detected while adding commercials to Event'
elsif errors.all? { |_k, v| v.blank? }
flash[:notice] = 'Successfully added commercials.'
else
errors_text = ''