plays-hub/app/controllers/statistics_controller.rb

14 lines
425 B
Ruby

class StatisticsController < ApplicationController
before_action :authenticate_user!
def index
stats = Statistics.new(current_user)
@total_plays = stats.total_plays
@activity_by_day = stats.activity_by_day
@top_artists_all_time = stats.top_artists_all_time
@top_artists_year = stats.top_artists_year
@top_artists_upcoming = stats.top_artists_upcoming
@since_date = stats.since_date
end
end