class User
Public Instance Methods
is_pending()
click to toggle source
# File lib/templates/user.rb, line 12 def is_pending owner = Account.find(self.account_id).users.first true unless self.invitation_accepted_at || self == owner end
Private Instance Methods
create_account()
click to toggle source
# File lib/templates/user.rb, line 19 def create_account if self.account_id.nil? account = Account.create(owner_id: self.id) self.update(account: account) end end