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!
尝试使用input_html
而不是html
:
<%= f.email_field :email, :input_html => "isRequired" %>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.