Books by Becky Chambers

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 Quiet Mirror 5 Kim Robinson, Liu Cixin, and Becky Chambers Nonfiction 32.73 € Del Rey ✓
The Quiet Forest 8 Becky Chambers Fiction 11.98 € Ace ✗
The Quiet Door 18 Becky Chambers Scifi 21.79 € Gollancz ✗
The Hidden Archive 22 Becky Chambers, Mary Shelley, and Frank Herbert Fiction 23.21 € — ✓
The Hidden Engine 23 Stanisław Lem, Adrian Tchaikovsky, and Becky Chambers Scifi 40.55 € DAW ✗
The Hidden Engine 31 Becky Chambers, Mary Shelley, and Stanisław Lem Fiction 32.85 € Vintage ✓
The Ancient Garden 43 Frank Herbert, Iain Banks, and Becky Chambers Fiction 42.67 € Orbit ✓
The Hidden Station 44 Margaret Atwood, Martha Wells, and Becky Chambers Scifi 12.11 € Tor Books ✓
The Silent Station 60 Becky Chambers, Octavia Butler, and Margaret Atwood Nonfiction 34.96 € DAW ✗
The Ancient Engine 71 Becky Chambers Scifi 32.68 € — ✓
The Burning Forest 81 Ted Chiang, Becky Chambers, and Liu Cixin Nonfiction 6.28 € Del Rey ✓
The Distant Winter 96 Martha Wells and Becky Chambers Fiction 10.36 € Gollancz ✓
The Endless Engine 97 Becky Chambers Nonfiction 43.50 € DAW ✓
The Endless Empire 117 Becky Chambers and Ted Chiang Scifi 29.30 € — ✓
The Silent Station 120 Martha Wells, Becky Chambers, and Mary Shelley Scifi 42.11 € DAW ✓
Filter
Cover
Title
Author names
Genre
Price
Publisher
Active
Reset