Edit: DAW

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
  # the contact is written through the publisher, so it is edited in place
  attribute :contact, nested: %i[name email]

  fieldset :form, %i[name slug founded_on contact brochure]
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

Contact
Remove
A value is stored. Leave empty to keep it.
No value stored.