also save the model after changing it ...
This commit is contained in:
parent
727372c7ef
commit
3b47847276
1 changed files with 1 additions and 0 deletions
|
@ -47,6 +47,7 @@ class User < ActiveRecord::Base
|
|||
.limit(num_orders)
|
||||
.pluck(:created_at)
|
||||
self.frecency = last_timestamps.map(&:to_i).sum / num_orders
|
||||
self.save
|
||||
end
|
||||
|
||||
def balance
|
||||
|
|
Loading…
Reference in a new issue