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 60 :profile => lambda {|vote| vote.voteable.profile},
61 61 :value => lambda {|vote| vote.vote},
62 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 66 :vote_voteable => {
66 67 :action => 'vote#create',
... ... @@ -75,7 +76,6 @@ module Merit
75 76 :action => 'vote#create',
76 77 :undo_action => 'vote#destroy',
77 78 :to => lambda {|vote| vote.voter},
78   - :profile => lambda {|vote| vote.voter},
79 79 :value => lambda {|vote| 1},
80 80 :description => _('Point weight for a voter'),
81 81 :default_weight => 10
... ...