form_for not passing html attributes

13 views
Skip to first unread message

Mendel Schneerson

unread,
Jan 27, 2016, 2:36:06 PM1/27/16
to rubyonra...@googlegroups.com
Hello,

I am trying to disable chrome HTML5 validations by setting the
novalidate attribute.

form_for(:customer, url: {:action => 'update', :id => @customer.id,
:account_settings => true},:html => {:novalidate => 'novalidate'}) do
|f|
= render(:partial => 'form', :locals => {:f => f})

But when the form renders in chrome it does not show up.
<input class="form-control" id="customer_contact_email"
name="customer[contact_email]" pattern="false" type="email">

And the validations stop me from submitting the form.
Thank you,

Mendel.

--
Posted via http://www.ruby-forum.com/.
Reply all
Reply to author
Forward
0 new messages