Merge pull request #138 from ZeusWPI/frecencydebtupdate
Update frecencydebt
This commit is contained in:
commit
009bdeec76
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ class User < ActiveRecord::Base
|
|||
.pluck(:created_at)
|
||||
frequency = (last_datetimes.map(&:to_time).map(&:to_i).sum / (num_orders * 10))
|
||||
bonus = self.rich_privilege / 1.936
|
||||
self.frecency = frequency * bonus
|
||||
self.frecency = (frequency * bonus * (self.admin ? 1.01 : 1)).to_i
|
||||
self.save
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue