[Fix #2800] Handle empty cells

Evidently link_to handles nil differently when it receives it as a first
argument than when it is returned from a block argument
This commit is contained in:
Frederic Merizen 2018-10-10 19:22:59 +02:00 committed by gregoirenovel
parent 734352beba
commit 05c8c3f18b

View file

@ -106,7 +106,9 @@
- @procedure_presentation.displayed_field_values(dossier).each do |value| - @procedure_presentation.displayed_field_values(dossier).each do |value|
%td %td
= link_to(value, gestionnaire_dossier_path(@procedure, dossier), class: 'cell-link') / FIXME: value should automatically fallback to `""` instead of nil
/ #get_value should call to_s on the champ
= link_to(value || "", gestionnaire_dossier_path(@procedure, dossier), class: 'cell-link')
%td.status-col %td.status-col
= link_to(gestionnaire_dossier_path(@procedure, dossier), class: 'cell-link') do = link_to(gestionnaire_dossier_path(@procedure, dossier), class: 'cell-link') do