Sha256: 276d313173a5f53da5f286e181bba0f81626ea19000f3cb4bf78f0d60d6f0b65

Contents?: true

Size: 746 Bytes

Versions: 12

Compression:

Stored size: 746 Bytes

Contents

<!-- Please don't edit this file. It will be clobbered. -->

# 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.

    index :as => :grid do |product|
      link_to(image_tag(product.image_path), admin_products_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 colums that are rendered using the columns
option:

    index :as => :grid, :columns => 5 do |product|
      link_to(image_tag(product.image_path), admin_products_path(product))
    end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
activeadmin-0.4.0 docs/3-index-pages/index-as-grid.md
andrewroth_activeadmin-0.3.4.4 docs/3-index-pages/index-as-grid.md
andrewroth_activeadmin-0.3.4.3 docs/3-index-pages/index-as-grid.md
andrewroth_activeadmin-0.3.4.2 docs/3-index-pages/index-as-grid.md
andrewroth_activeadmin-0.3.4.1 docs/3-index-pages/index-as-grid.md
andrewroth_activeadmin-0.3.4 docs/3-index-pages/index-as-grid.md
activeadmin-0.3.4 docs/3-index-pages/index-as-grid.md
activeadmin-0.3.3 docs/3-index-pages/index-as-grid.md
activeadmin-0.3.2 docs/3-index-pages/index-as-grid.md
activeadmin-0.3.1 docs/3-index-pages/index-as-grid.md
activeadmin-0.3.0 docs/3-index-pages/index-as-grid.md
nsm-activeadmin-0.2.2 docs/3-index-pages/index-as-grid.md