Class: Maquina::DashboardController

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

Instance Method Summary collapse

Methods included from Authenticate

#after_authentication_url, #authenticated?, #current_user, #require_authentication

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
# File 'app/controllers/maquina/dashboard_controller.rb', line 5

def index
  if Maquina::Current.signed_in? && Maquina::Current.management?
    @stats = [
      {label: t("maquina.dashboard.index.stats.total_plans"), value: Maquina::Plan.count},
      {label: t("maquina.dashboard.index.stats.total_organizations"), value: Maquina::Organization.count}
    ]
  end
end