How this page is built
the gem renders it — this is all you write
A full table — search, an inline filter row, sortable columns and row actions — all derived from the model. This page toggles between the curated :index and the fuller :catalog fieldset (currently :index). Your controller assigns @books — scope it for authorization (e.g. Book.accessible_by(current_ability)) and the gem renders that scope.
app/models/book.rb
crud_structure do
attribute :price, as: :number, unit: '€', digits: 2
fieldset :index, %i[cover title author_names genre price publisher active]
fieldset :catalog, %i[cover title subtitle author_names genre price purchase_price
shop_margin pages published_on publisher reviews active manual created_at]
end
app/views/books/index.html.erb
<%= crud_collection @books, fieldset: :index %> <%# search, filters, sort, actions %>
<%= crud_filter @books, fieldset: :index %> <%# filter sidebar (the model, or the list's scope) %>
Read more: Fields & cells · Views & fieldsets
| Cover | Title | Author names | Genre | Price | Publisher | Active | ||
|---|---|---|---|---|---|---|---|---|
|
|
|
|
||||||
![]() |
The Hidden Forest 1 | Frank Herbert, Ted Chiang, and Ann Leckie | Nonfiction | 28.24 € | Orbit | ✗ | ||
![]() |
The Broken Engine 9 | Ted Chiang, Ann Leckie, and Frank Herbert | Fiction | 32.99 € | Gollancz | ✗ | ||
![]() |
The Endless City 21 | Ursula Le Guin, Frank Herbert, and Octavia Butler | Scifi | 36.46 € | Vintage | ✓ | ||
![]() |
The Hidden Archive 22 | Becky Chambers, Mary Shelley, and Frank Herbert | Fiction | 23.21 € | — | ✓ | ||
![]() |
The Quiet City 27 | Frank Herbert | Scifi | 39.79 € | DAW | ✓ | ||
![]() |
The Ancient Garden 43 | Frank Herbert, Iain Banks, and Becky Chambers | Fiction | 42.67 € | Orbit | ✓ | ||
![]() |
The Endless Station 55 | Ann Leckie, Frank Herbert, and Joe Abercrombie | Nonfiction | 20.24 € | — | ✓ | ||
![]() |
The Luminous City 57 | Adrian Tchaikovsky, Frank Herbert, and Margaret Atwood | Scifi | 23.17 € | Ace | ✓ | ||
![]() |
The Endless Signal 73 | Frank Herbert, Iain Banks, and Margaret Atwood | Scifi | 19.39 € | Del Rey | ✓ | ||
![]() |
The Hidden Tower 75 | Frank Herbert | Scifi | 5.34 € | Vintage | ✓ | ||
![]() |
The Luminous Tower 77 | Kim Robinson, Frank Herbert, and Joe Abercrombie | Scifi | 28.81 € | Vintage | ✓ | ||
![]() |
The Distant Station 86 | Frank Herbert and Mary Shelley | Fiction | 12.86 € | Orbit | ✓ | ||
![]() |
The Luminous Tower 88 | Frank Herbert, Liu Cixin, and Ursula Le Guin | Nonfiction | 37.25 € | Ace | ✓ | ||
![]() |
The Hidden Tower 91 | Adrian Tchaikovsky, Frank Herbert, and Kim Robinson | Scifi | 29.28 € | Ace | ✓ | ||
![]() |
The Hidden Garden 99 | Frank Herbert | Fiction | 24.11 € | DAW | ✓ | ||
![]() |
The Broken City 102 | Ann Leckie, Margaret Atwood, and Frank Herbert | Nonfiction | 40.54 € | Gollancz | ✓ | ||
![]() |
The Dispossessed Door 103 | Iain Banks and Frank Herbert | Fiction | 30.10 € | Ace | ✗ | ||
![]() |
The Broken Forest 104 | Octavia Butler and Frank Herbert | Fiction | 17.49 € | — | ✓ | ||
![]() |
The Distant Archive 111 | Frank Herbert | Nonfiction | 11.59 € | DAW | ✓ | ||
![]() |
The Dispossessed Signal 112 | Ted Chiang and Frank Herbert | Scifi | 38.73 € | Gollancz | ✓ | ||
![]() |
The Ancient Archive 114 | Frank Herbert, Kim Robinson, and Margaret Atwood | Nonfiction | 44.21 € | Ace | ✓ | ||




















