Sha256: 1c2165b80a4bd7a39957b671c3248afaa15e727186adfdd47653d5068cd00b6c

Contents?: true

Size: 744 Bytes

Versions: 54

Compression:

Stored size: 744 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_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 colums that are rendered using the columns
option:

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

Version data entries

54 entries across 54 versions & 2 rubygems

Version Path
lalala-4.0.0.dev.141 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.136 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.135 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.134 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.133 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.132 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.131 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.129 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.128 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.126 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.125 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.124 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.123 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.118 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.116 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.114 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.113 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.111 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.109 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md
lalala-4.0.0.dev.107 vendor/deps/active_admin/docs/3-index-pages/index-as-grid.md