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 Distant City 10 | Stanisław Lem, Ted Chiang, and Liu Cixin | Scifi | 26.91 € | DAW | ✓ | ||
![]() |
The Endless Winter 28 | Iain Banks, Liu Cixin, and Ted Chiang | Fiction | 29.97 € | Tor Books | ✓ | ||
![]() |
The Dispossessed Winter 29 | Ted Chiang and Ann Leckie | Nonfiction | 9.04 € | DAW | ✓ | ||
![]() |
The Distant Garden 34 | Ted Chiang | Nonfiction | 25.55 € | Ace | ✓ | ||
![]() |
The Distant Engine 46 | Margaret Atwood and Ted Chiang | Fiction | 21.25 € | Orbit | ✓ | ||
![]() |
The Broken Empire 48 | Ted Chiang and Ann Leckie | Fiction | 30.49 € | Orbit | ✗ | ||
![]() |
The Quiet Empire 59 | Kim Robinson, Liu Cixin, and Ted Chiang | Fiction | 39.87 € | Vintage | ✓ | ||
![]() |
The Burning Forest 81 | Ted Chiang, Becky Chambers, and Liu Cixin | Nonfiction | 6.28 € | Del Rey | ✓ | ||
![]() |
The Dispossessed Archive 82 | Octavia Butler and Ted Chiang | Scifi | 35.72 € | Ace | ✓ | ||
![]() |
The Quiet Door 87 | Ted Chiang | Scifi | 35.06 € | Tor Books | ✓ | ||
![]() |
The Quiet Tower 90 | Octavia Butler, Ted Chiang, and Margaret Atwood | Nonfiction | 31.01 € | Tor Books | ✓ | ||
![]() |
The Luminous Ocean 108 | Ted Chiang | Nonfiction | 39.89 € | Orbit | ✗ | ||
![]() |
The Hidden Garden 109 | Ted Chiang | Fiction | 22.95 € | Vintage | ✓ | ||
![]() |
The Dispossessed Signal 112 | Ted Chiang and Frank Herbert | Scifi | 38.73 € | Gollancz | ✓ | ||
![]() |
The Silent Archive 116 | Ted Chiang and Joe Abercrombie | Fiction | 10.28 € | — | ✓ | ||
![]() |
The Endless Empire 117 | Becky Chambers and Ted Chiang | Scifi | 29.30 € | — | ✓ | ||

















