Skip to content

Commit

Permalink
Reward users for supplying their signup reason.
Browse files Browse the repository at this point in the history
  • Loading branch information
lazyatom committed Sep 19, 2011
1 parent 113e219 commit 1eebe5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/user.rb
Expand Up @@ -42,6 +42,7 @@ def to_param
twitter_nickname
end

REASON_WEIGHT = 5
PROPOSAL_WEIGHT = 10
INTERESTING_PROPOSALS_WEIGHT = 5
SUGGESTION_WEIGHT = 2
Expand All @@ -51,5 +52,6 @@ def update_contribution_score
(proposals.count * PROPOSAL_WEIGHT) +
(proposals_of_interest.count * INTERESTING_PROPOSALS_WEIGHT) +
(suggestions.count * SUGGESTION_WEIGHT)
self.contribution_score += REASON_WEIGHT if self.signup_reason.present?
end
end

0 comments on commit 1eebe5e

Please sign in to comment.