Grouped table

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

Grouping is a render-time arrangement, like the layout. Add group_by: :publisher — the gem orders by the group key, splits the rows into collapsible groups (chevron in the header) and shows a per-group count. With 61 books, groups start collapsed beyond config.group_collapse_threshold (default 50), opening only the first; the open ones live in ?open=, so a half-expanded view is copy-pasteable.

app/views/groups/index.html.erb
<%= crud_collection @books, group_by: :publisher %>   <%# belongs_to, enum or a column %>

Read more: Grouping

Cover Title Author names Genre Price Publisher Active
— 8
The Dispossessed City 4 Kim Robinson, Margaret Atwood, and Adrian Tchaikovsky Fiction 19.95 € — ✓
The Burning Winter 6 Octavia Butler Scifi 21.78 € — ✓
The Endless Station 11 Joe Abercrombie Scifi 10.86 € — ✓
The Hidden Archive 22 Becky Chambers, Mary Shelley, and Frank Herbert Fiction 23.21 € — ✓
The Endless Door 35 Martha Wells Nonfiction 24.06 € — ✓
The Luminous Machine 41 Ursula Le Guin Nonfiction 23.63 € — ✓
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 € — ✓
Tor Books 7
Ace 9
The Quiet Forest 8 Becky Chambers Fiction 11.98 € Ace ✗
The Hidden Mirror 14 Ursula Le Guin and Kim Robinson Nonfiction 22.58 € Ace ✗
The Burning Tower 20 Ann Leckie Scifi 14.56 € Ace ✓
The Endless Winter 30 Octavia Butler Scifi 39.19 € Ace ✓
The Endless Signal 33 Adrian Tchaikovsky Fiction 39.74 € Ace ✓
The Distant Garden 34 Ted Chiang Nonfiction 25.55 € Ace ✓
The Burning Station 50 Ursula Le Guin and Octavia Butler Fiction 14.43 € Ace ✓
The Luminous City 57 Adrian Tchaikovsky, Frank Herbert, and Margaret Atwood Scifi 23.17 € Ace ✓
The Broken Empire 58 Martha Wells Scifi 34.83 € Ace ✓
Orbit 6
The Hidden Forest 1 Frank Herbert, Ted Chiang, and Ann Leckie Nonfiction 28.24 € Orbit ✗
The Hidden Winter 32 Kim Robinson, Stanisław Lem, and Margaret Atwood Scifi 40.79 € Orbit ✓
The Ancient Garden 43 Frank Herbert, Iain Banks, and Becky Chambers Fiction 42.67 € Orbit ✓
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 Ancient Forest 56 Iain Banks, Ursula Le Guin, and Kim Robinson Scifi 33.64 € Orbit ✓
Gollancz 4
The Broken Engine 9 Ted Chiang, Ann Leckie, and Frank Herbert Fiction 32.99 € Gollancz ✗
The Quiet Door 18 Becky Chambers Scifi 21.79 € Gollancz ✗
The Ancient Mirror 24 Mary Shelley Fiction 33.42 € Gollancz ✓
The Distant Door 26 Ann Leckie, Iain Banks, and Liu Cixin Nonfiction 16.40 € Gollancz ✓
DAW 9
Baen 4
The Dispossessed Station 12 Martha Wells and Ann Leckie Nonfiction 16.58 € Baen ✓
The Burning Door 36 Kim Robinson Nonfiction 31.42 € Baen ✓
The Silent Tower 39 Ann Leckie, Mary Shelley, and Ursula Le Guin Nonfiction 25.60 € Baen ✓
The Luminous City 45 Ann Leckie, Kim Robinson, and Octavia Butler Nonfiction 19.30 € Baen ✗
Del Rey 7
The Quiet Mirror 5 Kim Robinson, Liu Cixin, and Becky Chambers Nonfiction 32.73 € Del Rey ✓
The Endless Forest 15 Octavia Butler, Ann Leckie, and Liu Cixin Scifi 11.84 € Del Rey ✓
The Ancient Signal 16 Joe Abercrombie Scifi 35.51 € Del Rey ✗
The Endless Winter 25 Ann Leckie Fiction 41.02 € Del Rey ✓
The Hidden Tower 47 Martha Wells Nonfiction 19.92 € Del Rey ✓
The Ancient Ocean 53 Martha Wells and Ursula Le Guin Fiction 25.74 € Del Rey ✓
The Dispossessed Empire 54 Margaret Atwood, Octavia Butler, and Stanisław Lem Nonfiction 43.50 € Del Rey ✓
Vintage 7