Commit e42f5f6928dcc42d7d89ebd9140baf627057bef4

Authored by Victor Costa
1 parent 573c0838

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,7 +19,7 @@ module Merit
19 :action => 'article#create', 19 :action => 'article#create',
20 :default_threshold => 5, 20 :default_threshold => 5,
21 :to => :author, 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 :positive_votes_received => { 24 :positive_votes_received => {
25 :action => 'vote#create', 25 :action => 'vote#create',