1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-11-24 07:06:28 +09:00

Cache result of SQL (#14534)

This commit is contained in:
niwatori24 2020-08-09 22:23:42 +09:00 committed by GitHub
parent bd3420b139
commit 8b61bb1c3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ class Form::CustomEmojiBatch
private
def custom_emojis
CustomEmoji.where(id: custom_emoji_ids)
@custom_emojis ||= CustomEmoji.where(id: custom_emoji_ids)
end
def update!