Class: RailsOpsDashboard::DashboardController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- RailsOpsDashboard::DashboardController
- Defined in:
- app/controllers/rails_ops_dashboard/dashboard_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/rails_ops_dashboard/dashboard_controller.rb', line 5 def index config = RailsOpsDashboard.configuration seeds_path = Rails.root.join(config.seeds_path, '*.rb') rake_tasks_path = config.rake_tasks_path Rails.application.load_tasks rake_count = Rake::Task.tasks.count { |t| t.locations.any? { |l| l.include?(rake_tasks_path) } } @stats = { seeds: Dir.glob(seeds_path).count, rake_tasks: rake_count } end |