Cache result of SQL (#14534)

lolsob-rspec
niwatori24 2020-08-09 22:23:42 +09:00 committed by GitHub
parent 09b322872a
commit 65c9d28fa1
1 changed files with 1 additions and 1 deletions

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!