Merge branch 'master' into youtube-requests
This commit is contained in:
commit
9bb9d954b3
1 changed files with 3 additions and 1 deletions
|
|
@ -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 !params[:file]
|
||||||
|
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 = ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue