문제

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