All animals are equal, but some animals are more equal than others
This commit is contained in:
parent
2069ea91db
commit
85b6cc7d7b
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