passing attributes to link_to

I have to pass an attribute to links for bootstrap-image-gallery, the docs say to build a link like this
<a href="images/apple.jpg" title="Apple" data-gallery> so then data-gallery is called an attribute in html5, would that be a "data attribute" in rails? how would i create the link with link_to

<%= link_to 'Apple', 'images/apple.jpg', data: { gallery: 'some value' } %>

If you've built a delete link before, you will recall those have data: { confirm: 'Are you sure?' } on them.

Walter