This commit is contained in:
Ankush Malik 2018-01-12 12:02:19 +00:00 • committed by GitHub
commit 67cc48d849

View file

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