From 6ec6987cc5ff559db0ed1d4ac9c436ad3bef6a70 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Fri, 12 Jun 2015 17:21:37 -0300 Subject: [PATCH] Fix vote point rule --- lib/merit/point_rules.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/merit/point_rules.rb b/lib/merit/point_rules.rb index c69975a..18bb48a 100644 --- a/lib/merit/point_rules.rb +++ b/lib/merit/point_rules.rb @@ -60,7 +60,8 @@ module Merit :profile => lambda {|vote| vote.voteable.profile}, :value => lambda {|vote| vote.vote}, :description => _('Point weight for the author of a voted content'), - :default_weight => 50 + :default_weight => 50, + :condition => lambda {|vote| vote.voteable.profile.community? } }, :vote_voteable => { :action => 'vote#create', @@ -75,7 +76,6 @@ module Merit :action => 'vote#create', :undo_action => 'vote#destroy', :to => lambda {|vote| vote.voter}, - :profile => lambda {|vote| vote.voter}, :value => lambda {|vote| 1}, :description => _('Point weight for a voter'), :default_weight => 10 -- libgit2 0.21.2