From e42f5f6928dcc42d7d89ebd9140baf627057bef4 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Tue, 11 Aug 2015 19:01:02 -0300 Subject: [PATCH] Fix badge rule for article author --- lib/merit/badge_rules.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/merit/badge_rules.rb b/lib/merit/badge_rules.rb index 434a945..8baa62e 100644 --- a/lib/merit/badge_rules.rb +++ b/lib/merit/badge_rules.rb @@ -19,7 +19,7 @@ module Merit :action => 'article#create', :default_threshold => 5, :to => :author, - :value => lambda { |article| article.author.present? ? article.author.articles.count : 0 } + :value => lambda { |article| article.author.present? ? article.environment.articles.text_articles.where(:author_id => article.author.id).count : 0 } }, :positive_votes_received => { :action => 'vote#create', -- libgit2 0.21.2