Class: UffizziCore::Account

Inherits:
ApplicationRecord show all
Extended by:
Enumerize
Includes:
AASM, StateMachineConcern
Defined in:
app/models/uffizzi_core/account.rb

Defined Under Namespace

Classes: CreateCredentialJob

Instance Method Summary collapse

Instance Method Details

#active_projectsObject



71
72
73
# File 'app/models/uffizzi_core/account.rb', line 71

def active_projects
  projects.active
end

#disable_projectsObject



75
76
77
# File 'app/models/uffizzi_core/account.rb', line 75

def disable_projects
  active_projects.each(&:disable_deployments)
end

#update_payment_issue_dateObject



67
68
69
# File 'app/models/uffizzi_core/account.rb', line 67

def update_payment_issue_date
  update(payment_issue_at: DateTime.current)
end

#userObject

This method is deprecated. Don’t use it.



80
81
82
# File 'app/models/uffizzi_core/account.rb', line 80

def user
  users.find_by(memberships: { role: UffizziCore::Membership.role.admin })
end