Sha256: ce700f45261ad75072257a71cba5b2694f4ebfd6d5040c274f4394854fd26ba4
Contents?: true
Size: 318 Bytes
Versions: 25
Compression:
Stored size: 318 Bytes
Contents
class UserStats < ApplicationRecord belongs_to :organization belongs_to :user def self.stats_for(user) UserStats.find_or_initialize_by(user: user, organization: Organization.current) end def self.exp_for(user) self.stats_for(user).exp end def add_exp!(points) self.exp += points end end
Version data entries
25 entries across 25 versions & 2 rubygems