bootstrap_form icon indicating copy to clipboard operation
bootstrap_form copied to clipboard

Pass additional attributes to the label

Open rzane opened this issue 8 years ago • 0 comments
trafficstars

Currently, you can do this:

<%= f.text_field :name, label: { text: 'Name', class: 'my-label-class' } %>

This is great if you want to control the class name on the label; however, all other attributes for the label are ignored. Imagine you wanted a tooltip on the label:

<%= f.text_field :name, label: { text: 'Name', data: { toggle: 'tooltip', title: 'My tooltip' } } %>

I think this is probably more predictable behavior.

rzane avatar Sep 18 '17 18:09 rzane