Skip to content

Commit

Permalink
Indentation error.
Browse files Browse the repository at this point in the history
  • Loading branch information
varyonic committed Aug 30, 2017
1 parent 92ed417 commit 398000d
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions lib/active_admin/views/index_as_grid.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,30 +1,30 @@
module ActiveAdmin module ActiveAdmin
module Views module Views


# # Index as a Grid # # Index as a Grid
# #
# Sometimes you want to display the index screen for a set of resources 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 # (possibly a grid of thumbnail images). To do so, use the :grid option for the
# index block. # index block.
# #
# ```ruby # ```ruby
# index as: :grid do |product| # index as: :grid do |product|
# link_to image_tag(product.image_path), admin_product_path(product) # link_to image_tag(product.image_path), admin_product_path(product)
# end # end
# ``` # ```
# #
# The block is rendered within a cell in the grid once for each resource in the # 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. # 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 # You can customize the number of columns that are rendered using the columns
# option: # option:
# #
# ```ruby # ```ruby
# index as: :grid, columns: 5 do |product| # index as: :grid, columns: 5 do |product|
# link_to image_tag(product.image_path), admin_product_path(product) # link_to image_tag(product.image_path), admin_product_path(product)
# end # end
# ``` # ```
# #
class IndexAsGrid < ActiveAdmin::Component class IndexAsGrid < ActiveAdmin::Component


def build(page_presenter, collection) def build(page_presenter, collection)
Expand All @@ -42,7 +42,7 @@ def self.index_name
"grid" "grid"
end end


protected protected


def build_table def build_table
resource_selection_toggle_panel if active_admin_config.batch_actions.any? resource_selection_toggle_panel if active_admin_config.batch_actions.any?
Expand Down

0 comments on commit 398000d

Please sign in to comment.