mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
optimization
This commit is contained in:
parent
78153ec126
commit
67bbb6fbe8
@ -10,7 +10,7 @@ module HasChangelog
|
||||
ContentChangeEvent.where(
|
||||
content_id: id,
|
||||
content_type: self.class.name
|
||||
).order(:id)
|
||||
).includes(:user).order(:id)
|
||||
end
|
||||
|
||||
def attribute_change_events(limit=100)
|
||||
@ -20,7 +20,7 @@ module HasChangelog
|
||||
entity_id: id
|
||||
),
|
||||
content_type: "Attribute"
|
||||
).order(:id).last(limit)
|
||||
).includes(:user).order(:id).last(limit)
|
||||
end
|
||||
|
||||
after_create do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user