Class: AdminResources::DashboardController

Inherits:
ApplicationController show all
Defined in:
app/controllers/admin_resources/dashboard_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#admin_custom_pages, #admin_models, #admin_path_for, #after_sign_in_path_for, #after_sign_out_path_for

Instance Method Details

#indexObject



3
4
5
6
7
8
# File 'app/controllers/admin_resources/dashboard_controller.rb', line 3

def index
  puts "[AdminResources::DashboardController] index - showing dashboard"
  @model_counts = AdminResources.model_names.each_with_object({}) do |model_name, hash|
    hash[model_name] = model_name.constantize.count
  end
end