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
| Title | Genre | Price | Publisher | Publisher › Name | Publisher › Founded on | Authors › Name | Authors › Email | Active | Shelf | Weight | Signed | Acquired |
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
||||||||||
| The Hidden Forest 1 | Nonfiction | 28.24 € | Orbit | Orbit | 1974-01-01 | Frank Herbert, Ted Chiang, Ann Leckie | frank@example.com, ted@example.com, ann@example.com | ✗ | A1 | 191.0 g | ✗ | 2022-07-15 | ||
| The Ancient Winter 3 | Fiction | 24.81 € | DAW | DAW | 1971-01-01 | Joe Abercrombie | joe@example.com | ✗ | C2 | 276.0 g | ✓ | 2025-04-30 | ||
| The Quiet Forest 8 | Fiction | 11.98 € | Ace | Ace | 1952-01-01 | Becky Chambers | becky@example.com | ✗ | Reserve | 631.0 g | ✓ | 2023-09-12 | ||
| The Broken Engine 9 | Fiction | 32.99 € | Gollancz | Gollancz | 1927-01-01 | Ted Chiang, Ann Leckie, Frank Herbert | ted@example.com, ann@example.com, frank@example.com | ✗ | B2 | 873.0 g | ✓ | 2022-06-19 | ||
| The Endless Station 13 | Fiction | 27.05 € | DAW | DAW | 1971-01-01 | Ann Leckie, Martha Wells, Ursula Le Guin | ann@example.com, martha@example.com, ursula@example.com | ✗ | A1 | 748.0 g | ✗ | 2026-04-16 | ||
| The Hidden Mirror 14 | Nonfiction | 22.58 € | Ace | Ace | 1952-01-01 | Ursula Le Guin, Kim Robinson | ursula@example.com, kim@example.com | ✗ | C2 | 848.0 g | ✗ | 2026-11-03 | ||
| The Ancient Signal 16 | Scifi | 35.51 € | Del Rey | Del Rey | 1977-01-01 | Joe Abercrombie | joe@example.com | ✗ | B2 | 497.0 g | ✓ | 2021-06-10 | ||
| The Quiet Door 18 | Scifi | 21.79 € | Gollancz | Gollancz | 1927-01-01 | Becky Chambers | becky@example.com | ✗ | A1 | 910.0 g | ✓ | 2023-07-11 | ||
| The Hidden Engine 23 | Scifi | 40.55 € | DAW | DAW | 1971-01-01 | Stanisław Lem, Adrian Tchaikovsky, Becky Chambers | stanislaw@example.com, adrian@example.com, becky@example.com | ✗ | C1 | 674.0 g | ✗ | 2026-10-31 | ||
| The Luminous City 45 | Nonfiction | 19.30 € | Baen | Baen | 1983-01-01 | Ann Leckie, Kim Robinson, Octavia Butler | ann@example.com, kim@example.com, octavia@example.com | ✗ | B1 | 252.0 g | ✓ | 2021-07-23 | ||
| The Broken Empire 48 | Fiction | 30.49 € | Orbit | Orbit | 1974-01-01 | Ted Chiang, Ann Leckie | ted@example.com, ann@example.com | ✗ | A2 | 391.0 g | ✓ | 2022-03-22 | ||
| The Silent Station 60 | Nonfiction | 34.96 € | DAW | DAW | 1971-01-01 | Becky Chambers, Octavia Butler, Margaret Atwood | becky@example.com, octavia@example.com, margaret@example.com | ✗ | B1 | 673.0 g | ✗ | 2024-11-29 | ||
| The Broken Station 61 | Nonfiction | 18.89 € | DAW | DAW | 1971-01-01 | Octavia Butler | octavia@example.com | ✗ | A1 | 688.0 g | ✗ | 2022-05-22 | ||
| The Quiet Dune 62 | Nonfiction | 24.14 € | Vintage | Vintage | 1954-01-01 | Mary Shelley | mary@example.com | ✗ | A1 | 474.0 g | ✓ | 2021-06-19 | ||
| The Hidden Ocean 65 | Nonfiction | 43.18 € | Del Rey | Del Rey | 1977-01-01 | Joe Abercrombie, Iain Banks, Ann Leckie | joe@example.com, iain@example.com, ann@example.com | ✗ | A2 | 624.0 g | ✗ | 2025-11-22 | ||
| The Hidden Engine 78 | Scifi | 8.00 € | — | — | — | Iain Banks | iain@example.com | ✗ | B1 | 800.0 g | ✓ | 2022-06-14 | ||
| The Luminous Mirror 84 | Nonfiction | 19.40 € | Ace | Ace | 1952-01-01 | Kim Robinson, Ann Leckie | kim@example.com, ann@example.com | ✗ | Reserve | 568.0 g | ✗ | 2025-03-08 | ||
| The Burning Archive 100 | Fiction | 24.48 € | — | — | — | Joe Abercrombie | joe@example.com | ✗ | B1 | 813.0 g | ✗ | 2024-02-04 | ||
| The Dispossessed Door 103 | Fiction | 30.10 € | Ace | Ace | 1952-01-01 | Iain Banks, Frank Herbert | iain@example.com, frank@example.com | ✗ | Reserve | 738.0 g | ✗ | 2023-09-26 | ||
| The Luminous Ocean 108 | Nonfiction | 39.89 € | Orbit | Orbit | 1974-01-01 | Ted Chiang | ted@example.com | ✗ | A2 | 354.0 g | ✗ | 2025-08-28 | ||
| The Silent Engine 115 | Fiction | 24.38 € | — | — | — | Octavia Butler, Margaret Atwood, Ursula Le Guin | octavia@example.com, margaret@example.com, ursula@example.com | ✗ | A2 | 282.0 g | ✓ | 2026-05-11 | ||
| The Burning Empire 118 | Fiction | 17.01 € | DAW | DAW | 1971-01-01 | Kim Robinson, Mary Shelley, Margaret Atwood | kim@example.com, mary@example.com, margaret@example.com | ✗ | Reserve | 720.0 g | ✓ | 2025-09-30 | ||
| The Ancient Archive 119 | Fiction | 21.49 € | DAW | DAW | 1971-01-01 | Octavia Butler, Mary Shelley | octavia@example.com, mary@example.com | ✗ | A2 | 559.0 g | ✗ | 2026-10-26 | ||