method

attributes

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 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.