Handle upload file size limit in UI
This commit is contained in:
parent
534e041e1b
commit
a643f34621
7 changed files with 90 additions and 9 deletions
|
@ -37,7 +37,10 @@ class Users::DescriptionController < UsersController
|
|||
unless params[:cerfa_pdf].nil?
|
||||
cerfa = @dossier.cerfa
|
||||
cerfa.content = params[:cerfa_pdf]
|
||||
cerfa.save
|
||||
unless cerfa.save
|
||||
flash.now.alert = cerfa.errors.full_messages.join('<br />').html_safe
|
||||
return render 'show'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -51,7 +54,10 @@ class Users::DescriptionController < UsersController
|
|||
@dossier.pieces_justificatives.each do |piece_justificative|
|
||||
unless params["piece_justificative_#{piece_justificative.type}"].nil?
|
||||
piece_justificative.content = params["piece_justificative_#{piece_justificative.type}"]
|
||||
piece_justificative.save
|
||||
unless piece_justificative.save
|
||||
flash.now.alert = piece_justificative.errors.full_messages.join('<br />').html_safe
|
||||
return render 'show'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue