!foo.empty? -> foo.present?

This commit is contained in:
gregoirenovel 2018-01-11 20:06:38 +01:00
parent aedafbaf2e
commit 3593adbe66
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ class Users::DescriptionController < UsersController
end
end
if !((errors_upload = PiecesJustificativesService.upload!(@dossier, current_user, params)).empty?)
if (errors_upload = PiecesJustificativesService.upload!(@dossier, current_user, params)).present?
if flash.alert.nil?
flash.alert = errors_upload
else

View file

@ -58,6 +58,6 @@
type: champ.type_champ }
- if !champ.description.empty?
- if champ.description.present?
%div{ id: "description_champs_#{champ.id}", class: ('help-block' if champ.type_champ != 'engagement') }
= simple_format(sanitize(champ.description_with_links, attributes: %w(href target)))