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.
18 19 20 21 |
# File 'lib/active_admin/views/pages/index.rb', line 18 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
25 26 27 28 29 30 |
# File 'lib/active_admin/views/pages/index.rb', line 25 def main_content wrap_with_batch_action_form do build_table_tools build_collection end end |
#title ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/active_admin/views/pages/index.rb', line 9 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 |