Column picker

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

Pass picker: true and a gear appears in the header row: the user ticks which columns are shown and (with the optional crud-columns Stimulus controller) drags to reorder them. It submits ?cols[]= to this same URL — like the sort links and filter row — so it opens and works without JavaScript. The picker groups every column by its source model (Pipedrive-style): own columns under this model, association and path columns under the model they reach — publisher.founded_on under Publisher, authors.email under Author. The selection is always intersected with the permitted set, so a forged ?cols= can only hide or reorder, never reveal one.

app/models/book.rb
fieldset :picker, %i[title genre price publisher publisher.name
                     publisher.founded_on authors.name authors.email active]   # path columns: assoc.attr
app/views/columns/index.html.erb
<%= crud_collection @books, fieldset: :picker,
                     extra_columns: @columns,   <%# declared + path + dynamic — all pickable %>
                     picker: true %>            <%# gear + read ?cols= (picked_columns: :auto) %>

Read more: Column picker  ·  Path columns

Reset
Title Genre Price Publisher Publisher › Name Publisher › Founded on Authors › Name Authors › Email Active Shelf Weight Signed Acquired
Reset
The Endless Mirror 2 Nonfiction 28.63 € Vintage Vintage 1954-01-01 Ann Leckie, Mary Shelley, Ursula Le Guin ann@example.com, mary@example.com, ursula@example.com ✓ B1 462.0 g ✗ 2022-12-26
The Quiet Mirror 5 Nonfiction 32.73 € Del Rey Del Rey 1977-01-01 Kim Robinson, Liu Cixin, Becky Chambers kim@example.com, liu@example.com, becky@example.com ✓ B1 212.0 g ✗ 2026-10-01
The Dispossessed Station 12 Nonfiction 16.58 € Baen Baen 1983-01-01 Martha Wells, Ann Leckie martha@example.com, ann@example.com ✓ C1 517.0 g ✓ 2024-12-06
The Distant Door 26 Nonfiction 16.40 € Gollancz Gollancz 1927-01-01 Ann Leckie, Iain Banks, Liu Cixin ann@example.com, iain@example.com, liu@example.com ✓ Reserve 593.0 g ✓ 2024-09-09
The Dispossessed Winter 29 Nonfiction 9.04 € DAW DAW 1971-01-01 Ted Chiang, Ann Leckie ted@example.com, ann@example.com ✓ C2 924.0 g ✓ 2026-08-12
The Distant Garden 34 Nonfiction 25.55 € Ace Ace 1952-01-01 Ted Chiang ted@example.com ✓ C1 427.0 g ✗ 2024-07-05
The Endless Door 35 Nonfiction 24.06 € — — — Martha Wells martha@example.com ✓ A2 593.0 g ✓ 2026-02-09
The Burning Door 36 Nonfiction 31.42 € Baen Baen 1983-01-01 Kim Robinson kim@example.com ✓ A1 480.0 g ✗ 2024-01-24
The Broken Mirror 37 Nonfiction 7.28 € Tor Books Tor Books 1980-01-01 Margaret Atwood, Octavia Butler margaret@example.com, octavia@example.com ✓ A1 316.0 g ✗ 2026-08-29
The Silent Tower 39 Nonfiction 25.60 € Baen Baen 1983-01-01 Ann Leckie, Mary Shelley, Ursula Le Guin ann@example.com, mary@example.com, ursula@example.com ✓ C1 225.0 g ✗ 2024-05-06
The Luminous Machine 41 Nonfiction 23.63 € — — — Ursula Le Guin ursula@example.com ✓ A2 549.0 g ✓ 2026-09-27
The Hidden Tower 47 Nonfiction 19.92 € Del Rey Del Rey 1977-01-01 Martha Wells martha@example.com ✓ B1 556.0 g ✓ 2026-06-03
The Ancient Machine 51 Nonfiction 40.77 € Tor Books Tor Books 1980-01-01 Ann Leckie, Ursula Le Guin ann@example.com, ursula@example.com ✓ Reserve 916.0 g ✓ 2023-01-30
The Dispossessed Empire 54 Nonfiction 43.50 € Del Rey Del Rey 1977-01-01 Margaret Atwood, Octavia Butler, Stanisław Lem margaret@example.com, octavia@example.com, stanislaw@example.com ✓ C2 493.0 g ✓ 2025-12-24
The Endless Station 55 Nonfiction 20.24 € — — — Ann Leckie, Frank Herbert, Joe Abercrombie ann@example.com, frank@example.com, joe@example.com ✓ A2 785.0 g ✗ 2022-09-15
The Luminous Forest 68 Nonfiction 40.60 € Baen Baen 1983-01-01 Liu Cixin, Ann Leckie, Ursula Le Guin liu@example.com, ann@example.com, ursula@example.com ✓ C1 514.0 g ✗ 2022-08-19
The Ancient Ocean 74 Nonfiction 14.70 € Gollancz Gollancz 1927-01-01 Margaret Atwood margaret@example.com ✓ C2 933.0 g ✓ 2023-01-11
The Ancient Engine 80 Nonfiction 17.29 € — — — Martha Wells, Kim Robinson martha@example.com, kim@example.com ✓ B2 623.0 g ✓ 2026-01-12
The Burning Forest 81 Nonfiction 6.28 € Del Rey Del Rey 1977-01-01 Ted Chiang, Becky Chambers, Liu Cixin ted@example.com, becky@example.com, liu@example.com ✓ A2 714.0 g ✓ 2026-02-16
The Luminous City 85 Nonfiction 22.63 € DAW DAW 1971-01-01 Liu Cixin, Stanisław Lem, Iain Banks liu@example.com, stanislaw@example.com, iain@example.com ✓ A2 356.0 g ✗ 2026-01-10
The Luminous Tower 88 Nonfiction 37.25 € Ace Ace 1952-01-01 Frank Herbert, Liu Cixin, Ursula Le Guin frank@example.com, liu@example.com, ursula@example.com ✓ C1 726.0 g ✓ 2025-01-27
The Quiet Tower 90 Nonfiction 31.01 € Tor Books Tor Books 1980-01-01 Octavia Butler, Ted Chiang, Margaret Atwood octavia@example.com, ted@example.com, margaret@example.com ✓ Reserve 644.0 g ✗ 2025-08-06
The Hidden Winter 92 Nonfiction 29.93 € Del Rey Del Rey 1977-01-01 Margaret Atwood, Octavia Butler, Iain Banks margaret@example.com, octavia@example.com, iain@example.com ✓ C2 636.0 g ✓ 2023-06-06
The Endless Engine 97 Nonfiction 43.50 € DAW DAW 1971-01-01 Becky Chambers becky@example.com ✓ B2 197.0 g ✗ 2025-01-27
The Endless Mirror 98 Nonfiction 33.32 € DAW DAW 1971-01-01 Adrian Tchaikovsky, Martha Wells, Ann Leckie adrian@example.com, martha@example.com, ann@example.com ✓ C2 468.0 g ✗ 2024-11-29
The Broken City 102 Nonfiction 40.54 € Gollancz Gollancz 1927-01-01 Ann Leckie, Margaret Atwood, Frank Herbert ann@example.com, margaret@example.com, frank@example.com ✓ B2 190.0 g ✗ 2022-03-23
The Hidden Door 106 Nonfiction 19.30 € Orbit Orbit 1974-01-01 Martha Wells, Mary Shelley, Stanisław Lem martha@example.com, mary@example.com, stanislaw@example.com ✓ C1 316.0 g ✓ 2023-04-17
The Burning Station 110 Nonfiction 24.38 € Baen Baen 1983-01-01 Mary Shelley mary@example.com ✓ C2 272.0 g ✗ 2026-03-26
The Distant Archive 111 Nonfiction 11.59 € DAW DAW 1971-01-01 Frank Herbert frank@example.com ✓ C1 739.0 g ✓ 2026-03-20
The Ancient Archive 114 Nonfiction 44.21 € Ace Ace 1952-01-01 Frank Herbert, Kim Robinson, Margaret Atwood frank@example.com, kim@example.com, margaret@example.com ✓ C1 484.0 g ✓ 2024-01-24