Class: ActiveAdmin::Page
- Inherits:
-
Object
- Object
- ActiveAdmin::Page
- Includes:
- Base, Resource::ActionItems, Resource::Controllers, Resource::Menu, Resource::Naming, Resource::PagePresenters, Resource::Sidebars
- Defined in:
- lib/active_admin/page.rb
Overview
Page is the primary data storage for page configuration in Active Admin
When you register a page (ActiveAdmin.page “Status”) you are actually creating a new Page instance within the given Namespace.
The instance of the current page is available in PageController and views by calling the #active_admin_config method.
Defined Under Namespace
Modules: Base
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
The name of the page.
-
#namespace ⇒ Object
readonly
The namespace this config belongs to.
Instance Method Summary collapse
- #add_default_action_items ⇒ Object
- #add_default_sidebar_sections ⇒ Object
- #belongs_to? ⇒ Boolean
-
#plural_resource_name ⇒ Object
plural_resource_name is singular.
- #resource_name ⇒ Object
Methods included from Resource::Naming
#camelized_resource_name, #plural_camelized_resource_name, #plural_underscored_resource_name, #resource_key, #underscored_resource_name
Methods included from Resource::Menu
#include_in_menu?, #menu, #menu_item_display_if, #menu_item_name, #menu_item_priority, #menu_options, #parent_menu_item_name
Methods included from Resource::ActionItems
#action_items, #action_items?, #action_items_for, #add_action_item, #clear_action_items!, #initialize
Methods included from Resource::Sidebars
#clear_sidebar_sections!, #initialize, #sidebar_sections, #sidebar_sections?, #sidebar_sections_for
Methods included from Resource::PagePresenters
#get_page_presenter, #page_presenters, #set_page_presenter
Methods included from Resource::Controllers
#controller, #controller_name, #route_collection_path, #route_prefix
Methods included from Base
Instance Attribute Details
#name ⇒ Object (readonly)
The name of the page
16 17 18 |
# File 'lib/active_admin/page.rb', line 16 def name @name end |
#namespace ⇒ Object (readonly)
The namespace this config belongs to
13 14 15 |
# File 'lib/active_admin/page.rb', line 13 def namespace @namespace end |
Instance Method Details
#add_default_action_items ⇒ Object
47 48 |
# File 'lib/active_admin/page.rb', line 47 def add_default_action_items end |
#add_default_sidebar_sections ⇒ Object
50 51 |
# File 'lib/active_admin/page.rb', line 50 def end |
#belongs_to? ⇒ Boolean
43 44 45 |
# File 'lib/active_admin/page.rb', line 43 def belongs_to? false end |
#plural_resource_name ⇒ Object
plural_resource_name is singular
35 36 37 |
# File 'lib/active_admin/page.rb', line 35 def plural_resource_name name end |
#resource_name ⇒ Object
39 40 41 |
# File 'lib/active_admin/page.rb', line 39 def resource_name name end |