<% path = @term.persisted? ? category_term_path(params[:category_id], @term) : category_terms_path(params[:category_id]) %> <%= form_with(model: term, local: true, url: path ) do |form| %> <% if term.errors.any? %>

<%= pluralize(term.errors.count, "error") %> prohibited this term from being saved:

<% end %>
<%= form.select :category_id, PolicyManager::Category.all.map{|o| [o.name, o.id]}, :selected => params[:category_id] %> We'll never share your email with anyone else.
<%= form.label :description %> <%= form.text_area :description, id: :term_description, class: "form-control" %>
<%= form.submit class: "btn btn-primary" %> <% end %>