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 Ancient Winter 3 | Joe Abercrombie | Fiction | 24.81 € | DAW | ✗ | ||
![]() |
The Endless Station 11 | Joe Abercrombie | Scifi | 10.86 € | — | ✓ | ||
![]() |
The Ancient Signal 16 | Joe Abercrombie | Scifi | 35.51 € | Del Rey | ✗ | ||
![]() |
The Endless Dune 17 | Joe Abercrombie, Mary Shelley, and Stanisław Lem | Fiction | 18.69 € | Tor Books | ✓ | ||
![]() |
The Hidden Mirror 19 | Joe Abercrombie, Ursula Le Guin, and Adrian Tchaikovsky | Fiction | 37.51 € | Vintage | ✓ | ||
![]() |
The Distant Garden 52 | Joe Abercrombie and Ursula Le Guin | Fiction | 36.80 € | — | ✓ | ||
![]() |
The Endless Station 55 | Ann Leckie, Frank Herbert, and Joe Abercrombie | Nonfiction | 20.24 € | — | ✓ | ||
![]() |
The Distant Tower 63 | Iain Banks, Liu Cixin, and Joe Abercrombie | Scifi | 18.55 € | Baen | ✓ | ||
![]() |
The Hidden Ocean 65 | Joe Abercrombie, Iain Banks, and Ann Leckie | Nonfiction | 43.18 € | Del Rey | ✗ | ||
![]() |
The Luminous Tower 77 | Kim Robinson, Frank Herbert, and Joe Abercrombie | Scifi | 28.81 € | Vintage | ✓ | ||
![]() |
The Dispossessed Empire 89 | Kim Robinson and Joe Abercrombie | Scifi | 11.61 € | — | ✓ | ||
![]() |
The Burning Archive 100 | Joe Abercrombie | Fiction | 24.48 € | — | ✗ | ||
![]() |
The Silent Archive 116 | Ted Chiang and Joe Abercrombie | Fiction | 10.28 € | — | ✓ | ||












