5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 15:46:21 +00:00

feat: poder pasar data a un checkbox

This commit is contained in:
f 2024-06-18 16:06:59 -03:00
parent af2f97e56e
commit db07eefb92
No known key found for this signature in database

View file

@ -1,6 +1,6 @@
:ruby
help_id = "#{id}_help"
checkbox_attributes = local_assigns.slice(:id, :type, :name, :value, :required, :checked)
checkbox_attributes = local_assigns.slice(:id, :type, :name, :value, :required, :checked, :data)
checkbox_attributes[:type] ||= 'checkbox'
.custom-control{ class: "custom-#{checkbox_attributes[:type]}" }