From 0fb0bd13e4e09c910bc4159985b714f43f6d0fe0 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 9 Jun 2017 15:13:44 +0200 Subject: TableBuilderHelper: Correct `selectable` behaviour I had coded this the opposite of what it should have been. Instead, if `selectable` is true, we should show the selection checkboxes. Invert the conditions and add `selectable: true` to the `table_builder_2` calls that expect a checkbox column. Also remove the TODO because this argument is necessary. Refs #3479 --- spec/helpers/table_builder_helper_spec.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'spec') diff --git a/spec/helpers/table_builder_helper_spec.rb b/spec/helpers/table_builder_helper_spec.rb index 165e9c3f4..dd4db0840 100644 --- a/spec/helpers/table_builder_helper_spec.rb +++ b/spec/helpers/table_builder_helper_spec.rb @@ -110,6 +110,7 @@ describe TableBuilderHelper, type: :helper do :created_at => Proc.new {|w| l(w.created_at, format: :short)}, :updated_at => Proc.new {|w| l(w.updated_at, format: :short)}, :published_at => ''}, + selectable: true, links: [:show, :edit, :archive, :unarchive, :delete], cls: 'table has-filter has-search' ) -- cgit v1.2.3