Вопрос

does anyone know how to set an attribute without key-value in rails simple_form?

<%= f.email_field :email, :html => "isRequired" %>

will generate :

 <input html="isRequired" ...

what I would like to get is :

 <input isRequired ...

Thank you for help!

Это было полезно?

Решение

Try using input_html instead of html:

<%= f.email_field :email, :input_html => "isRequired" %>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top