aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorZog2018-02-12 11:18:10 +0100
committerZog2018-02-12 11:18:10 +0100
commitb090709fa414939f8c561e9d14bcbb378015c67e (patch)
treee9dd671c94ecbfc3735fd86c89deb2a834b30eee /app/views
parent7f044f8ab9cf9394c4180f3d467a74bd95dcd398 (diff)
downloadchouette-core-b090709fa414939f8c561e9d14bcbb378015c67e.tar.bz2
Refs #5877; Add a condition on TableBuilderHelper::Column5877-handle-nil-objects-in-tablebuilderhelper
Diffstat (limited to 'app/views')
-rw-r--r--app/views/compliance_check_sets/index.html.slim5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/compliance_check_sets/index.html.slim b/app/views/compliance_check_sets/index.html.slim
index 31ad31e5b..2b5e5cb2d 100644
--- a/app/views/compliance_check_sets/index.html.slim
+++ b/app/views/compliance_check_sets/index.html.slim
@@ -23,9 +23,10 @@
), \
TableBuilderHelper::Column.new( \
key: :associated_object, \
- attribute: Proc.new{|n| n.referential.present? ? n.referential.name : ''}, \
+ if: ->(compliance_check_set){ compliance_check_set.referential.present? }, \
+ attribute: Proc.new{|n| n.referential.name}, \
link_to: lambda do |compliance_check_set| \
- compliance_check_set.referential.present? ? referential_path(compliance_check_set.referential_id) : '#' \
+ referential_path(compliance_check_set.referential_id) \
end \
), \
TableBuilderHelper::Column.new( \