c57f18c20c
The domain language is clearer if we just persist a thread. Also rename some models so their purpose is clear.
12 lines
255 B
Ruby
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
|