@@ -57,7 +57,6 @@ module Frequency
57
57
has_many :following_users , through : :active_relationships , source : :followed
58
58
has_many :followers , through : :passive_relationships , source : :follower
59
59
has_many :likes
60
- has_many :answers , foreign_key : :uid
61
60
has_many :answer_selections , foreign_key : :user_id
62
61
has_many :revisions , through : :node
63
62
has_many :comments , foreign_key : :uid
@@ -436,11 +435,10 @@ def find_by_username_case_insensitive(username)
436
435
# all users who've posted a node, comment, or answer in the given period
437
436
def contributor_count_for ( start_time , end_time )
438
437
notes = Node . where ( type : 'note' , status : 1 , created : start_time . to_i ..end_time . to_i ) . pluck ( :uid )
439
- answers = Answer . where ( created_at : start_time ..end_time ) . pluck ( :uid )
440
438
questions = Node . questions . where ( status : 1 , created : start_time . to_i ..end_time . to_i ) . pluck ( :uid )
441
439
comments = Comment . where ( timestamp : start_time . to_i ..end_time . to_i ) . pluck ( :uid )
442
440
revisions = Revision . where ( status : 1 , timestamp : start_time . to_i ..end_time . to_i ) . pluck ( :uid )
443
- contributors = ( notes + answers + questions + comments + revisions ) . compact . uniq . size
441
+ contributors = ( notes + questions + comments + revisions ) . compact . uniq . size
444
442
contributors
445
443
end
446
444
@@ -467,12 +465,11 @@ def create_with_omniauth(auth)
467
465
468
466
def count_all_time_contributor
469
467
notes = Node . where ( type : 'note' , status : 1 ) . pluck ( :uid )
470
- answers = Answer . pluck ( :uid )
471
468
questions = Node . questions . where ( status : 1 ) . pluck ( :uid )
472
469
comments = Comment . pluck ( :uid )
473
470
revisions = Revision . where ( status : 1 ) . pluck ( :uid )
474
471
475
- ( notes + answers + questions + comments + revisions ) . compact . uniq . size
472
+ ( notes + questions + comments + revisions ) . compact . uniq . size
476
473
end
477
474
478
475
def watching_location ( nwlat , selat , nwlng , selng )
0 commit comments