Files
fizzy/app/models/event.rb
T
David Heinemeier Hansson 1d404830f4 Must touch to bust bubble caches
2024-10-19 17:42:06 -07:00

13 lines
291 B
Ruby

class Event < ApplicationRecord
THREADABLE_ACTIONS = %w[ assigned boosted created ]
include Assignments
belongs_to :creator, class_name: "User"
belongs_to :bubble, touch: true
has_one :account, through: :creator
scope :threadable, -> { where action: THREADABLE_ACTIONS }
end