Files
fizzy/app/models/concerns/threadable.rb
T
Jose Farias c57f18c20c Materialize abstract thread
The domain language is clearer if we just persist a thread. Also rename some models so their purpose is clear.
2024-10-24 17:36:14 -06:00

12 lines
255 B
Ruby

module Threadable
extend ActiveSupport::Concern
TYPES = %w[ Comment Event::Rollup ]
included do
has_one :thread_entry, as: :threadable, class_name: "Bubble::Thread::Entry"
after_create -> { create_thread_entry! thread: thread }
end
end