כיצד אוכל להוסיף מאפיין למודל המשתמש?

I change

add_to_class(:user, :total_earned_points) do
    # self.user_points.sum(:reward_points)
    self.total_point[:total_earned_points]
end

to

add_to_class(:user, :total_earned_points) do
    # self.user_points.sum(:reward_points)
    self.total_point.read_attribute(:total_earned_points)
end

still doesn’t work. :cold_sweat:
Can anyone help me?