From 7086f156c0b74e803b40ba7a741ef1d69816f5eb Mon Sep 17 00:00:00 2001 From: "Jesse C. Fisher" Date: Wed, 7 Jul 2021 23:01:09 -0700 Subject: [PATCH] Add card data attribute to inventory cards --- app/views/tables/_seat.html.haml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/tables/_seat.html.haml b/app/views/tables/_seat.html.haml index 30744ec8..efd6b97b 100644 --- a/app/views/tables/_seat.html.haml +++ b/app/views/tables/_seat.html.haml @@ -28,7 +28,11 @@ - seat.player.inventory.each do |card| %li %label - = check_box_tag 'player_card_ids[]', card.id + = check_box_tag 'player_card_ids[]', + card.id, + false, + data: {value: card.id, card_name: card.rank.gsub('11','J') .gsub('12','Q') .gsub('13','K') .gsub('14','A') .gsub('15','2') + ' ' + card.suit} + -# %input{form: "player_controls_" + card.player_id.to_s, type: "checkbox", name: "player_card_ids[]",