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


For example, "required."

Thus presses the tracks with any attempts to add the attribute:

  & lt;% = f.email_field: email ,: "ng-model "= & Gt; "Whatever" ,: class => "Form-control input-LG" ,: "required"%>  

Just use Boolean values:

  & Lt; % = F.email_field: email ,: "ng-model" = & gt; "Whatever" ,: class => "Form-Control Input-LG" ,: "Required" = & gt; True% & gt;  

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -