Files
fizzy/app/models/bubble/thread/entry.rb
T
2024-10-24 19:27:55 -06:00

14 lines
358 B
Ruby

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