From 9470a51cfc5fb3fd4d5fde2fb4e12caf3eaaa8eb Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 1 Sep 2017 15:14:45 +0200 Subject: TableBuilderHelper: Test out column-specific `#link_to` Testing out the new `TableBuilderHelper::Column#link_to` method to provide the link needed to go to the row object's #show page. Seems to work in this context, which is promising! --- app/views/workbenches/show.html.slim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim index 8d924b360..bb54f07cb 100644 --- a/app/views/workbenches/show.html.slim +++ b/app/views/workbenches/show.html.slim @@ -27,7 +27,10 @@ [ \ TableBuilderHelper::Column.new( \ key: :name, \ - attribute: 'name' \ + attribute: 'name', \ + link_to: lambda do |referential| \ + referential_path(referential) \ + end \ ), \ TableBuilderHelper::Column.new( \ key: :status, \ -- cgit v1.2.3