app/views/categories/_form.html.erb
<%= form_with(model: category, local: true) do |form| %>
<%= form_errors category %>
<div class="form-group">
<%= form.label :name %>
<%= form.text_field :name, class: "form-control" %>
</div>
<div class="form-group">
<%= form.label :description %>
<%= form.text_field :description, class: "form-control" %>
</div>
<div class="form-group">
<%= form.label :parent_id %>
<%= form.text_field :parent_id, class: "form-control" %>
</div>
<%= form.submit class: "btn btn-primary" %>
<% end %>