Merge pull request #29 from Retrospring/feature-discover
Only show new users that have asked at least 1 question (Discover)
This commit is contained in:
commit
64a7450b28
|
@ -6,7 +6,7 @@ class DiscoverController < ApplicationController
|
||||||
|
|
||||||
@popular_answers = Answer.where("created_at > ?", Time.now.ago(1.week)).order(:smile_count).reverse_order.limit(top_x)
|
@popular_answers = Answer.where("created_at > ?", Time.now.ago(1.week)).order(:smile_count).reverse_order.limit(top_x)
|
||||||
@popular_questions = Question.where("created_at > ?", Time.now.ago(1.week)).order(:answer_count).reverse_order.limit(top_x)
|
@popular_questions = Question.where("created_at > ?", Time.now.ago(1.week)).order(:answer_count).reverse_order.limit(top_x)
|
||||||
@new_users = User.order(:id).reverse_order.limit(top_x)
|
@new_users = User.where("asked_count > 0").order(:id).reverse_order.limit(top_x)
|
||||||
|
|
||||||
# .user = the user
|
# .user = the user
|
||||||
# .question_count = how many questions did the user ask
|
# .question_count = how many questions did the user ask
|
||||||
|
|
Loading…
Reference in New Issue