Duplicar posible:
Best way to use html5 data attributes with rails content_tag helper?carriles - helper link_to data- * atributo
¿Cómo puedo utilizar HTML5 data-*
attrubute en mi helper link_to (rieles)
La API dice que tengo que usar este formato link_to(body, url, html_options = {})
pero tengo un error cuando lo puse en html_options
Ex:
link_to "whatever", @whatever_path, { class: 'my_class', data-tooltip: 'what I want' }
¿Cómo es tu intento actual? –