Publishers

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

A curated table. fieldset :index chooses the columns; label :name defines how a publisher renders wherever it's linked from other models. Your controller assigns the scope @publishers.

app/models/publisher.rb
crud_structure do
  label :name
  fieldset :index, %i[name founded_on books]
end
app/views/publishers/index.html.erb
<%= crud_collection @publishers %>

Read more: Views & fieldsets  ·  Identity