Sha256: 9c6d5fcb68794f445299d5de4032bd01ea42ebb8d19cc227234cae12a7d6f71f
Contents?: true
Size: 839 Bytes
Versions: 7
Compression:
Stored size: 839 Bytes
Contents
module ActiveAdmin module Dashboards class DashboardController < ResourceController actions :index def index @dashboard_sections = find_sections render 'active_admin/dashboard/index.html.arb' end protected def set_current_tab @current_tab = I18n.t("active_admin.dashboard") end def find_sections ActiveAdmin::Dashboards.sections_for_namespace(namespace) end def namespace class_name = self.class.name if class_name.include?('::') self.class.name.split('::').first.underscore.to_sym else :root end end # Return the current menu for the view. This is a helper method def current_menu ActiveAdmin.application.namespaces[namespace].menu end end end end
Version data entries
7 entries across 7 versions & 3 rubygems