Files
fizzy/app/models/bucket.rb
T
2024-10-16 16:41:11 -06:00

12 lines
286 B
Ruby

class Bucket < ApplicationRecord
include Accessible, Views
belongs_to :account
belongs_to :creator, class_name: "User", default: -> { Current.user }
has_many :bubbles, dependent: :destroy
has_many :tags, -> { distinct }, through: :bubbles
validates_presence_of :name
end