From c773af4a19cdadfa249f3cf6db59fb6e8bd28d47 Mon Sep 17 00:00:00 2001 From: msdundar Date: Sun, 15 Jul 2018 00:29:17 +0300 Subject: [PATCH 1/2] updated dependencies --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b66e3bfeb..5e9ab9146 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -114,7 +114,7 @@ GEM dotenv-rails (2.5.0) dotenv (= 2.5.0) railties (>= 3.2, < 6.0) - email_address (0.1.10) + email_address (0.1.11) netaddr (~> 2.0) simpleidn equalizer (0.0.11) @@ -172,7 +172,7 @@ GEM mini_portile2 (~> 2.3.0) nori (2.6.0) orm_adapter (0.5.0) - pagy (0.12.0) + pagy (0.13.1) parallel (1.12.1) parser (2.5.1.2) ast (~> 2.4.0) @@ -188,7 +188,7 @@ GEM pry-rails (0.3.6) pry (>= 0.10.4) public_suffix (3.0.2) - puma (3.11.4) + puma (3.12.0) rack (2.0.5) rack-protection (2.0.3) rack @@ -232,7 +232,7 @@ GEM responders (2.4.0) actionpack (>= 4.2.0, < 5.3) railties (>= 4.2.0, < 5.3) - rollbar (2.16.2) + rollbar (2.16.3) multi_json rubocop (0.58.1) jaro_winkler (~> 1.5.1) @@ -300,7 +300,7 @@ GEM tilt (2.0.8) tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (4.1.14) + uglifier (4.1.15) execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext From d3c5fec7cdf18db6390ad788af733a135f02f8e1 Mon Sep 17 00:00:00 2001 From: msdundar Date: Sun, 15 Jul 2018 00:38:06 +0300 Subject: [PATCH 2/2] Do not include people with zero articles to most publishing --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 740819aa3..7612fb2da 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -51,6 +51,6 @@ def accounts end def self.most_publishing - order('articles_count desc').limit(10) + where.not(articles_count: nil).order('articles_count desc').limit(10) end end