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 42 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

Reset
Cover Title Author names Genre Price Publisher Active
Reset
2
Tor Books 1
The Endless Door 39 Joe Abercrombie Scifi 18.58 € Tor Books
Ace 2
The Endless Winter 37 Octavia Butler Scifi 39.19 € Ace
The Hidden Machine 38 Joe Abercrombie and Ann Leckie Scifi 38.74 € Ace
Orbit 1
The Hidden Dune 9 Iain Banks Scifi 42.43 € Orbit
Gollancz 1
The Quiet Station 12 Joe Abercrombie Scifi 11.40 € Gollancz
DAW 3
The Endless Mirror 20 Stanisław Lem and Ted Chiang Scifi 21.82 € DAW
The Endless Mirror 33 Frank Herbert Scifi 39.79 € DAW
The Dispossessed Engine 36 Kim Robinson and Mary Shelley Scifi 23.93 € DAW
Del Rey 3
Vintage 1