ruby - How do I add an Rails form helper HTML attribute that does not contain a quoted value? -



ruby - How do I add an Rails form helper HTML attribute that does not contain a quoted value? -

for example, "required."

rails chokes on effort add together attribute thus:

<%= f.email_field :email, :"ng-model" => "whatever", :class => "form-control input-lg", :"required" %>

just utilize boolean values:

<%= f.email_field :email, :"ng-model" => "whatever", :class => "form-control input-lg", :"required" => true %>

ruby-on-rails ruby

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -