Class: Oversee::DashboardController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/oversee/dashboard_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
# File 'app/controllers/oversee/dashboard_controller.rb', line 3

def index
  render Oversee::Dashboard::Index.new, layout: false
end

#showObject



7
8
9
10
11
12
13
# File 'app/controllers/oversee/dashboard_controller.rb', line 7

def show
  fetch_metrics

  root = Rails.root.join("app/oversee/cards/")
  files = Dir.glob(root.join("**/*.rb"))
  @class_strings = files.sort!.map! { |f| f.split(root.to_s).last.delete_suffix(".rb").classify }
end