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