Books by Ann Leckie

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 Hidden Forest 1 Frank Herbert, Ted Chiang, and Ann Leckie Nonfiction 28.24 € Orbit ✗
The Endless Mirror 2 Ann Leckie, Mary Shelley, and Ursula Le Guin Nonfiction 28.63 € Vintage ✓
The Broken Engine 9 Ted Chiang, Ann Leckie, and Frank Herbert Fiction 32.99 € Gollancz ✗
The Dispossessed Station 12 Martha Wells and Ann Leckie Nonfiction 16.58 € Baen ✓
The Endless Station 13 Ann Leckie, Martha Wells, and Ursula Le Guin Fiction 27.05 € DAW ✗
The Endless Forest 15 Octavia Butler, Ann Leckie, and Liu Cixin Scifi 11.84 € Del Rey ✓
The Burning Tower 20 Ann Leckie Scifi 14.56 € Ace ✓
The Endless Winter 25 Ann Leckie Fiction 41.02 € Del Rey ✓
The Distant Door 26 Ann Leckie, Iain Banks, and Liu Cixin Nonfiction 16.40 € Gollancz ✓
The Dispossessed Winter 29 Ted Chiang and Ann Leckie Nonfiction 9.04 € DAW ✓
The Silent Tower 39 Ann Leckie, Mary Shelley, and Ursula Le Guin Nonfiction 25.60 € Baen ✓
The Silent Archive 40 Ann Leckie Scifi 41.43 € DAW ✓
The Luminous City 45 Ann Leckie, Kim Robinson, and Octavia Butler Nonfiction 19.30 € Baen ✗
The Broken Empire 48 Ted Chiang and Ann Leckie Fiction 30.49 € Orbit ✗
The Ancient Machine 51 Ann Leckie and Ursula Le Guin Nonfiction 40.77 € Tor Books ✓
The Endless Station 55 Ann Leckie, Frank Herbert, and Joe Abercrombie Nonfiction 20.24 € — ✓
The Hidden Ocean 65 Joe Abercrombie, Iain Banks, and Ann Leckie Nonfiction 43.18 € Del Rey ✗
The Ancient Dune 67 Mary Shelley and Ann Leckie Fiction 38.41 € Tor Books ✓
The Luminous Forest 68 Liu Cixin, Ann Leckie, and Ursula Le Guin Nonfiction 40.60 € Baen ✓
The Luminous Mirror 84 Kim Robinson and Ann Leckie Nonfiction 19.40 € Ace ✗
The Endless Mirror 98 Adrian Tchaikovsky, Martha Wells, and Ann Leckie Nonfiction 33.32 € DAW ✓
The Dispossessed Ocean 101 Ann Leckie Fiction 12.58 € Vintage ✓
The Broken City 102 Ann Leckie, Margaret Atwood, and Frank Herbert Nonfiction 40.54 € Gollancz ✓
Filter
Cover
Title
Author names
Genre
Price
Publisher
Active
Reset