partydrone PRO said about 2 months ago on Bulk Updates :
You were actually on the right track with underscores in your data attributes. You can also create a `data` hash:

<%= check_box_tag :"bulk_ids[]", :all, checked?, data: {bulk_edit_target: "allCheckBox", action: "change->bulk-edit#clicked"} %>

The Rails view helper will convert the underscores into dashes for you and prepend each key in the hash with `data-`:

<input type="checkbox" name="bulk_ids[]" id="bulk_ids_" value="all" data-bulk-edit-target="allCheckBox" data-action="change->bulk-edit#clicked">

Great episode, as always! 🙂

NOTE: I checked this in a Rails 5.1 application. Things may be different in newer versions of Rails. Oh yeah, `checked?` is meant to be pseudo code. 😉