From e115d2cf86c285f66af37aa8ca66d63eb4144294 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 1 Sep 2017 16:47:10 +0200 Subject: table_builder_2: Use `Column#link_to` in all table builder calls Rewrite table builder calls to work with the new `TableBuilderHelper::Column#link_to` mechanism for defining the linked column and what it points to. This takes the link out of the `TableBuilderHelper`, and puts it into the hands of the view. It gives us more flexibility with regards to what can be defined as a link in our tables and what those links point to. This will be used in a more meaningful way in the `imports#show` page to list `NetexImport`s and provide links to both the referential associated with a Netex import and the imported file status page from a table row. --- app/views/api_keys/index.html.slim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/views/api_keys') diff --git a/app/views/api_keys/index.html.slim b/app/views/api_keys/index.html.slim index fc8d95c7a..9757b8955 100644 --- a/app/views/api_keys/index.html.slim +++ b/app/views/api_keys/index.html.slim @@ -12,7 +12,10 @@ [ \ TableBuilderHelper::Column.new( \ key: :name, \ - attribute: 'name' \ + attribute: 'name', \ + link_to: lambda do |api_key| \ + organisation_api_key_path(api_key) \ + end \ ), \ TableBuilderHelper::Column.new( \ key: :token, \ -- cgit v1.2.3