Reputation: 45
In my rails partial (_form.html.erb) I wrote this:
<%= f.text_field :title, required: true %>
The generated html is:
<input required="required" type="text" name="task[title]" id="task_title">
It works fine, but I want this:
<input type="text" name="task[title]" id="task_title" required>
How to set just 'required' into tag?
Upvotes: 0
Views: 3138