Sha256: aa514e68ca7792288e581c26f00d3079fd925c0765fce09c7b17f0b955338eaf
Contents?: true
Size: 1.03 KB
Versions: 19
Compression:
Stored size: 1.03 KB
Contents
# Tables An interface for creating tables is provided by `active_element.component.table`, available in all views. The two table types provided are [Collection Table](tables/collection-table.html) and [Item Table](tables/item-table.html). See the [full keyword argument specification](tables/options.html) for information on the various available options. ## Basic Example ```rspec:html collection = [ User.new(name: 'John', email: 'john@example.com', enabled: true), User.new(name: 'Jane', email: 'jane@example.org', enabled: false), User.new(name: 'Peter', email: 'peter@example.org', enabled: false), User.new(name: 'Sally', email: 'sally@example.org', enabled: true) ] subject do active_element.component.table collection: collection, fields: [:name, :email, :enabled], show: true, new: true, edit: true, destroy: true end it { is_expected.to include 'John' } ```
Version data entries
19 entries across 19 versions & 1 rubygems