Class: Hyrax::StatsController

Inherits:
ApplicationController
  • Object
show all
Includes:
Breadcrumbs, SingularSubresourceController
Defined in:
app/controllers/hyrax/stats_controller.rb

Instance Method Summary collapse

Methods included from Breadcrumbs

#build_breadcrumbs, #default_trail, #trail_from_referer

Methods included from SingularSubresourceController

#find_work

Methods included from DenyAccessOverrideBehavior

#deny_access

Instance Method Details

#fileObject



15
16
17
# File 'app/controllers/hyrax/stats_controller.rb', line 15

def file
  @stats = Hyrax::FileUsage.new(params[:id])
end

#workObject



9
10
11
12
13
# File 'app/controllers/hyrax/stats_controller.rb', line 9

def work
  @document = ::SolrDocument.find(params[:id])
  @pageviews = Hyrax::Analytics.daily_events_for_id(@document.id, 'work-view')
  @downloads = Hyrax::Analytics.daily_events_for_id(@document.id, 'file-set-in-work-download')
end