method

attributes

Importance_1
v7.1.3.2 - Show latest stable - 0 notes - Class: TagBuilder
attributes(attributes) public

Transforms a Hash into HTML Attributes, ready to be interpolated into ERB.

<input <%= tag.attributes(type: :text, aria: { label: "Search" }) %> >
# => <input type="text" aria-label="Search">
Show source
Register or log in to add new notes.