18 lines
470 B
Ruby
18 lines
470 B
Ruby
class Bubble < ApplicationRecord
|
|
include Colored
|
|
|
|
belongs_to :bucket
|
|
belongs_to :creator, class_name: "User", default: -> { Current.user }
|
|
|
|
has_many :comments, dependent: :destroy
|
|
has_many :boosts, dependent: :destroy
|
|
|
|
has_many :taggings, dependent: :destroy
|
|
has_many :tags, through: :taggings
|
|
|
|
has_many :assignments, dependent: :destroy
|
|
has_many :assignees, through: :assignments, source: :user
|
|
|
|
has_one_attached :image, dependent: :purge_later
|
|
end
|