rails/rails — pull request #14163 by fotanus (2014-02-23 02:03:51+00:00)
Title: Expands nested hashs when on data-attributes

On form helpers, currently we can pass a hash for the attribute `data`
and it expands it in many attributes. For example,
`:data => { :value => 3 }` generates the attribute `data-value="3"`.

However, only the first value is hold true for nested hashes. So the
hash `:data => { :plugin => { :value => 3 } }` generates the attributes
`data-plugin=""value:":"3""`.

ouldn't be better in the previous example if it generated the attribute
as `data-plugin-value="3"`? This is exactly the objective of this patch.