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

Name Founded on Brochure Books
Tor Books 1980-01-01 tor-books-brochure.adoc
Ace 1952-01-01
Orbit 1974-01-01 orbit-brochure.adoc
Gollancz 1927-01-01
DAW 1971-01-01 daw-brochure.adoc
Baen 1983-01-01
Del Rey 1977-01-01 del-rey-brochure.adoc
Vintage 1954-01-01