Files
fizzy/app/models/account.rb
T
Jorge Manrubia 9b4169c7ca Scope data by account
With a single database this problem is not as bad, but it feels
safer to do things right. Also, not everyone in an account has access
to all the bubbles.
2025-04-07 13:09:49 +02:00

22 lines
503 B
Ruby

class Account < ApplicationRecord
include PopReasons, Joinable
has_many :buckets, dependent: :destroy
has_many :bubbles, through: :buckets
has_many :users, dependent: :destroy do
def system
find_or_create_system_user(proxy_association.owner)
end
end
has_many :comments, through: :users
has_many :workflows, dependent: :destroy
has_many :stages, through: :workflows, class_name: "Workflow::Stage"
has_many :tags, dependent: :destroy
has_many_attached :uploads
end