also save the model after changing it ...

This commit is contained in:
Ilion Beyst 2016-02-16 15:03:15 +01:00
parent 727372c7ef
commit 3b47847276

View file

@ -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