Sha256: 082912c47afed1c2b931b7672fbbd7771d040028a83c4e945e4dbb3190850cc7
Contents?: true
Size: 823 Bytes
Versions: 35
Compression:
Stored size: 823 Bytes
Contents
<!-- WARNING: Please DO NOT edit this file! Update source documentation in lib/active_admin/views and execute rake yard to regenerate it. --> # Index as a Grid Sometimes you want to display the index screen for a set of resources as a grid (possibly a grid of thumbnail images). To do so, use the :grid option for the index block. ```ruby index as: :grid do |product| link_to image_tag(product.image_path), admin_product_path(product) end ``` The block is rendered within a cell in the grid once for each resource in the collection. The resource is passed into the block for you to use in the view. You can customize the number of columns that are rendered using the columns option: ```ruby index as: :grid, columns: 5 do |product| link_to image_tag(product.image_path), admin_product_path(product) end ```
Version data entries
35 entries across 35 versions & 6 rubygems