Merge pull request #168 from openHPI/activity-graphs

Activity graphs
This commit is contained in:
rteusner
2018-05-16 14:47:42 +02:00
committed by GitHub
16 changed files with 528 additions and 40 deletions

View File

@@ -8,6 +8,7 @@ class RequestForComment < ActiveRecord::Base
has_many :subscriptions
scope :unsolved, -> { where(solved: [false, nil]) }
scope :in_range, -> (from, to) { where(created_at: from..to) }
def self.last_per_user(n = 5)
from("(#{row_number_user_sql}) as request_for_comments")