fc56ad9d7c
- Switch to binary 16 for UUID keys - Remove AccountScopedRecord base class, all model use binary uuids now - Fix the search sql to serialize uuids properly - Patch the MySQL schema dumper to output binary lengths
16 lines
359 B
Ruby
16 lines
359 B
Ruby
class Reaction < ApplicationRecord
|
|
belongs_to :comment, touch: true
|
|
belongs_to :reacter, class_name: "User", default: -> { Current.user }
|
|
|
|
scope :ordered, -> { order(:created_at) }
|
|
|
|
after_create :register_card_activity
|
|
|
|
delegate :all_emoji?, to: :content
|
|
|
|
private
|
|
def register_card_activity
|
|
comment.card.touch_last_active_at
|
|
end
|
|
end
|