Commit e42f5f6928dcc42d7d89ebd9140baf627057bef4
1 parent
573c0838
Exists in
master
and in
1 other branch
Fix badge rule for article author
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/merit/badge_rules.rb
... | ... | @@ -19,7 +19,7 @@ module Merit |
19 | 19 | :action => 'article#create', |
20 | 20 | :default_threshold => 5, |
21 | 21 | :to => :author, |
22 | - :value => lambda { |article| article.author.present? ? article.author.articles.count : 0 } | |
22 | + :value => lambda { |article| article.author.present? ? article.environment.articles.text_articles.where(:author_id => article.author.id).count : 0 } | |
23 | 23 | }, |
24 | 24 | :positive_votes_received => { |
25 | 25 | :action => 'vote#create', | ... | ... |