diff options
author | niwatori24 <62463593+niwatori24@users.noreply.github.com> | 2020-08-09 22:23:42 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-09 15:23:42 +0200 |
commit | 8b61bb1c3e08e34e381b64eac88f2f6a6fb98680 (patch) | |
tree | 8c710571d67e4bde4f33a0bf27a57d8495b853d1 /app/models | |
parent | bd3420b1398c4c4ab2e2f2850b6dd6eaff0d361b (diff) |
Cache result of SQL (#14534)
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/form/custom_emoji_batch.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/form/custom_emoji_batch.rb b/app/models/form/custom_emoji_batch.rb index 6b7ea5355..f4fa84c10 100644 --- a/app/models/form/custom_emoji_batch.rb +++ b/app/models/form/custom_emoji_batch.rb @@ -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! |