-
Sean Doyle authored
Transforms a Hash into HTML Attributes, ready to be interpolated into ERB. ```html+erb <input <%= tag.attributes(type: :text, aria: { label: "Search" }) %> > <%# => <input type="text" aria-label="Search"> %> ``` Utilizes the `ActionView::Helpers::TagHelper#tag_options` implementation to enable combining ERB with attribute transformation, without requiring templates to replace HTML strings with `tag` or `content_tag` invocations. Co-authored-by:
David Heinemeier Hansson <david@loudthinking.com>
Sean Doyle authoredTransforms a Hash into HTML Attributes, ready to be interpolated into ERB. ```html+erb <input <%= tag.attributes(type: :text, aria: { label: "Search" }) %> > <%# => <input type="text" aria-label="Search"> %> ``` Utilizes the `ActionView::Helpers::TagHelper#tag_options` implementation to enable combining ERB with attribute transformation, without requiring templates to replace HTML strings with `tag` or `content_tag` invocations. Co-authored-by:
David Heinemeier Hansson <david@loudthinking.com>
Loading