Class: Admin::StatsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/admin/stats_controller.rb

Instance Method Summary collapse

Instance Method Details

#githubObject



17
18
19
20
21
22
# File 'app/controllers/admin/stats_controller.rb', line 17

def github
  @new_github_users   = stats_for(GithubUser)
  @new_manifests      = stats_for(Manifest)
  @new_readmes        = stats_for(Readme)
  @new_orgs           = stats_for(GithubOrganisation)
end

#indexObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/admin/stats_controller.rb', line 4

def index
  @recent_users = User.order('created_at DESC').limit(19)
  @recent_subscriptions = Subscription.where(repository_subscription_id: nil).order('created_at DESC').limit(7)
  @recent_watches = RepositorySubscription.order('created_at DESC').limit(7)

  @new_projects       = stats_for(Project)
  @new_versions       = stats_for(Version)
  @new_users          = stats_for(User)
  @new_subscriptions  = stats_for(Subscription)
  @new_repo_subs      = stats_for(RepositorySubscription)
  @new_web_hooks      = stats_for(WebHook)
end