method

attributes

rails latest stable - Class: ActionView::Helpers

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

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">