Commit 6ec6987cc5ff559db0ed1d4ac9c436ad3bef6a70

Authored by Victor Costa
1 parent 374a76cb

Fix vote point rule

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
lib/merit/point_rules.rb
@@ -60,7 +60,8 @@ module Merit @@ -60,7 +60,8 @@ module Merit
60 :profile => lambda {|vote| vote.voteable.profile}, 60 :profile => lambda {|vote| vote.voteable.profile},
61 :value => lambda {|vote| vote.vote}, 61 :value => lambda {|vote| vote.vote},
62 :description => _('Point weight for the author of a voted content'), 62 :description => _('Point weight for the author of a voted content'),
63 - :default_weight => 50 63 + :default_weight => 50,
  64 + :condition => lambda {|vote| vote.voteable.profile.community? }
64 }, 65 },
65 :vote_voteable => { 66 :vote_voteable => {
66 :action => 'vote#create', 67 :action => 'vote#create',
@@ -75,7 +76,6 @@ module Merit @@ -75,7 +76,6 @@ module Merit
75 :action => 'vote#create', 76 :action => 'vote#create',
76 :undo_action => 'vote#destroy', 77 :undo_action => 'vote#destroy',
77 :to => lambda {|vote| vote.voter}, 78 :to => lambda {|vote| vote.voter},
78 - :profile => lambda {|vote| vote.voter},  
79 :value => lambda {|vote| 1}, 79 :value => lambda {|vote| 1},
80 :description => _('Point weight for a voter'), 80 :description => _('Point weight for a voter'),
81 :default_weight => 10 81 :default_weight => 10