Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed zkim from top contributors eligability.

  • Loading branch information...
commit 4f47ce2e0eeb82fefe393cc71cb81447b51b2698 1 parent db494e4
@zk zk authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 app/controllers/main_controller.rb
View
10 app/controllers/main_controller.rb
@@ -11,8 +11,8 @@ def index
@recently_updated = find_recently_updated(7, nil)
@top_contributors = []
- tc_example_versions = Example.find_by_sql("select count(*), example_versions.user_id from example_versions group by user_id order by count(*) desc")[0, num_tc]
- tc_examples = Example.find_by_sql("select count(*), examples.user_id from examples group by user_id order by count(*) desc;")[0, num_tc]
+ tc_example_versions = Example.find_by_sql("select count(*), example_versions.user_id from example_versions group by user_id order by count(*) desc")[0, num_tc+1]
+ tc_examples = Example.find_by_sql("select count(*), examples.user_id from examples group by user_id order by count(*) desc;")[0, num_tc+1]
tc_examples.each do |e|
count = e["count(*)"]
@@ -23,8 +23,12 @@ def index
end
user = User.find(e.user_id)
- @top_contributors << {:author => user.login, :email => user.email, :score => count}
+ if not user.id == 1
+ @top_contributors << {:author => user.login, :email => user.email, :score => count}
+ end
end
+
+ @top_contributors = @top_contributors[0, num_tc]
end
Please sign in to comment.
Something went wrong with that request. Please try again.