Class: ActiveAdmin::Views::Pages::Index
- Defined in:
- lib/active_admin/views/pages/index.rb
Instance Method Summary collapse
-
#config ⇒ Object
Retrieves the given page presenter, or uses the default.
-
#main_content ⇒ Object
Renders the index configuration that was set in the controller.
- #title ⇒ Object
Methods included from Helpers::Collection
#collection_is_empty?, #collection_size
Methods inherited from Base
Instance Method Details
#config ⇒ Object
Retrieves the given page presenter, or uses the default.
19 20 21 22 |
# File 'lib/active_admin/views/pages/index.rb', line 19 def config active_admin_config.get_page_presenter(:index, params[:as]) || ActiveAdmin::PagePresenter.new(as: :table) end |
#main_content ⇒ Object
Renders the index configuration that was set in the controller. Defaults to rendering the ActiveAdmin::Pages::Index::Table
26 27 28 29 30 31 |
# File 'lib/active_admin/views/pages/index.rb', line 26 def main_content wrap_with_batch_action_form do build_table_tools build_collection end end |
#title ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/active_admin/views/pages/index.rb', line 10 def title if Proc === config[:title] controller.instance_exec &config[:title] else config[:title] || assigns[:page_title] || active_admin_config.plural_resource_label end end |