tap/app/models/user.rb
2014-11-23 21:12:31 +01:00

13 lines
142 B
Ruby

class User < ActiveRecord::Base
has_many :orders
before_save :init
def init
self.balance ||= 0
end
has_secure_password
end