From 2f08c09f02e78570b3fed8affc785333b7c53c53 Mon Sep 17 00:00:00 2001 From: Courteney Ervin Date: Tue, 28 Apr 2015 16:55:46 -0400 Subject: [PATCH] Remove Event#featured_projects_favorites_stats method This method has a bug, which would be easy enough to fix, except that the method itself doesn't currently add any value to the app. The data for featured projects can be better found using the results of Event#all_favorites_stats. --- app/models/event.rb | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/models/event.rb b/app/models/event.rb index c7e907d8..0af484de 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -57,20 +57,6 @@ def all_favorites_stats stats end - def featured_projects_favorites_stats - stats = { by_project: {} } - - all_favorites = all_favorites_stats[:by_project] - - projects.each do |project| - stats[:by_project][project.name] = all_favorites[project.name] - end - - stats[:total] = stats[:by_project].values.reduce(:+) - - stats - end - def github_api_args { day_begin: start_date, day_end: end_date } @@ -107,7 +93,6 @@ def fetch_engagement_stats stats = {} stats[:all_favorites] = all_favorites_stats - stats[:featured_favorites] = featured_projects_favorites_stats stats[:by_attendee] = attendee_github_stats stats[:by_project] = project_github_stats stats[:total] = total_github_stats