Merge d8ce1ac967 into d8f3933dc0
This commit is contained in:
commit
f9060f4fb1
1 changed files with 3 additions and 1 deletions
|
|
@ -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 errors.nil?
|
||||
flash[:error] = 'No file detected. Please attach a file.'
|
||||
elsif errors.all? { |_k, v| v.blank? }
|
||||
flash[:notice] = 'Successfully added commercials.'
|
||||
else
|
||||
errors_text = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue