data-
.
:data
with a Hash
value in an attribute hash.
%a{:href=>"/posts", :data => {:author_id => 123}} Posts By Authorwill render as:
<a data-author-id='123' href='/posts'>Posts By Author</a>
author_id
was replaced by a hyphen.
:hyphenate_data_attrs
option to false, and the output will be rendered as:
<a data-author_id='123' href='/posts'>Posts By Author</a>
Casiano Rodriguez León 2015-01-07