Class: ActiveAdmin::Views::IndexAsGrid

Inherits:
Component show all
Defined in:
lib/active_admin/views/index_as_grid.rb

Instance Method Summary collapse

Methods inherited from Component

#initialize, #tag_name

Constructor Details

This class inherits a constructor from ActiveAdmin::Component

Instance Method Details

#build(page_config, collection) ⇒ Object



5
6
7
8
9
# File 'lib/active_admin/views/index_as_grid.rb', line 5

def build(page_config, collection)
  @page_config = page_config
  @collection = collection
  build_table
end

#number_of_columnsObject



11
12
13
# File 'lib/active_admin/views/index_as_grid.rb', line 11

def number_of_columns
  @page_config[:columns] || default_number_of_columns
end