Files
fizzy/app/models/bubble/thread/entry.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
323 B
Ruby

class Bubble::Thread::Entry < ApplicationRecord
belongs_to :thread, touch: true
delegated_type :threadable, types: Threadable::TYPES, inverse_of: :thread_entry, dependent: :destroy
scope :chronologically, -> { order created_at: :asc, id: :desc }
def to_partial_path
"bubbles/threads/entries/entry"
end
end