Class: ActiveAdmin::Dashboards::DashboardController
- Inherits:
-
ResourceController
- Object
- InheritedResources::Base
- ResourceController
- ActiveAdmin::Dashboards::DashboardController
- Defined in:
- lib/active_admin/dashboards/dashboard_controller.rb
Constant Summary
Constants inherited from ResourceController
ResourceController::ACTIVE_ADMIN_ACTIONS
Instance Method Summary collapse
-
#current_menu ⇒ Object
protected
Return the current menu for the view.
- #find_sections ⇒ Object protected
- #index ⇒ Object
- #namespace ⇒ Object protected
- #set_current_tab ⇒ Object protected
Methods inherited from ResourceController
#active_admin_application, #active_admin_config, #active_admin_template, #authenticate_active_admin_user, #create, #csv_filename, #current_active_admin_user, #current_active_admin_user?, #determine_active_admin_layout, #edit, #new, #only_render_implemented_actions, #renderer_for, #show, #update
Methods included from ResourceController::Scoping
#begin_of_association_chain, #method_for_association_chain
Methods included from ResourceController::PageConfigurations
Methods included from ResourceController::Form
Methods included from ResourceController::Filters
Methods included from ResourceController::Collection::Pagination
#active_admin_collection, #paginate, #setup_pagination_for_csv
Methods included from ResourceController::Collection::Scoping
#active_admin_collection, #current_scope, #scope_collection
Methods included from ResourceController::Collection::Search
#active_admin_collection, #clean_search_params, #search
Methods included from ResourceController::Collection::Sorting
#active_admin_collection, #sort_order
Methods included from ResourceController::Collection::BaseCollection
#active_admin_collection, #collection, #scoped_collection
Instance Method Details
#current_menu ⇒ Object (protected)
Return the current menu for the view. This is a helper method
32 33 34 |
# File 'lib/active_admin/dashboards/dashboard_controller.rb', line 32 def ActiveAdmin.application.namespaces[namespace]. end |
#find_sections ⇒ Object (protected)
18 19 20 |
# File 'lib/active_admin/dashboards/dashboard_controller.rb', line 18 def find_sections ActiveAdmin::Dashboards.sections_for_namespace(namespace) end |
#index ⇒ Object
7 8 9 10 |
# File 'lib/active_admin/dashboards/dashboard_controller.rb', line 7 def index @dashboard_sections = find_sections render 'active_admin/dashboard/index.html.arb' end |
#namespace ⇒ Object (protected)
22 23 24 25 26 27 28 29 |
# File 'lib/active_admin/dashboards/dashboard_controller.rb', line 22 def namespace class_name = self.class.name if class_name.include?('::') self.class.name.split('::').first.underscore.to_sym else :root end end |
#set_current_tab ⇒ Object (protected)
14 15 16 |
# File 'lib/active_admin/dashboards/dashboard_controller.rb', line 14 def set_current_tab @current_tab = I18n.t("active_admin.dashboard") end |