class ActiveAdmin::Page
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.
Attributes
name[R]
The name of the page
namespace[R]
The namespace this config belongs to
page_actions[R]
An array of custom actions defined for this page
Public Instance Methods
add_default_action_items()
click to toggle source
# File lib/active_admin/page.rb, line 76 def add_default_action_items end
belongs_to?()
click to toggle source
# File lib/active_admin/page.rb, line 72 def belongs_to? false end
camelized_resource_name()
click to toggle source
# File lib/active_admin/page.rb, line 55 def camelized_resource_name underscored_resource_name.camelize end
clear_page_actions!()
click to toggle source
Clears all the custom actions this page knows about
# File lib/active_admin/page.rb, line 83 def clear_page_actions! @page_actions = [] end
controller_name()
click to toggle source
# File lib/active_admin/page.rb, line 63 def controller_name [namespace.module_name, camelized_resource_name + "Controller"].compact.join('::') end
plural_resource_label()
click to toggle source
label is singular
# File lib/active_admin/page.rb, line 43 def plural_resource_label name end
resource_name()
click to toggle source
# File lib/active_admin/page.rb, line 47 def resource_name @resource_name ||= Resource::Name.new(nil, name) end
route_uncountable?()
click to toggle source
Override from `ActiveAdmin::Resource::Controllers`
# File lib/active_admin/page.rb, line 68 def route_uncountable? false end
underscored_resource_name()
click to toggle source
# File lib/active_admin/page.rb, line 51 def underscored_resource_name resource_name.to_s.parameterize.underscore end