mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
14 lines
235 B
Ruby
14 lines
235 B
Ruby
class ContentChangeEvent < ApplicationRecord
|
|
belongs_to :user
|
|
|
|
serialize :changed_fields, Hash
|
|
|
|
def content
|
|
content_type.constantize.find_by(id: content_id)
|
|
end
|
|
|
|
def entity
|
|
content.try(:entity) || content
|
|
end
|
|
end
|