!foo.empty? -> foo.present?
This commit is contained in:
parent
aedafbaf2e
commit
3593adbe66
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Reference in a new issue