Edit: Tor Books

How this page is built the gem renders it — this is all you write

A derived form. fieldset :form chooses the editable fields; the permit list is the gem's CrudComponents.permitted_attributes, kept in lockstep with the form.

app/models/publisher.rb
crud_structure do
  fieldset :form, %i[name slug founded_on]
end
app/controllers/publishers_controller.rb
def publisher_params
  params.require(:publisher).permit(*CrudComponents.permitted_attributes(Publisher, action: :update, ability: current_ability))
end
app/views/publishers/edit.html.erb
<%= crud_form @publisher %>

Read more: Forms  ·  Fieldsets