From 848e71f16dc7d9a0ebf557c945906573352176b5 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sat, 6 Apr 2024 02:33:28 -0700 Subject: [PATCH] Remove unused `Pet.from_viewer_data` constructor I guess this was like, we had some call site that was handling loading the viewer data itself, and didn't want to have to reload it? But whatever, not used now, let's simplify! We can rebuild this easily if we need it again. --- app/models/pet.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/models/pet.rb b/app/models/pet.rb index b96fe30b..c4274d9c 100644 --- a/app/models/pet.rb +++ b/app/models/pet.rb @@ -121,12 +121,6 @@ class Pet < ApplicationRecord pet end - def self.from_viewer_data(viewer_data) - pet = Pet.find_or_initialize_by(name: viewer_data[:custom_pet][:name]) - pet.use_viewer_data(viewer_data) - pet - end - # NOTE: Ideally pet requests shouldn't take this long, but Neopets can be # slow sometimes! Since we're on the Falcon server, long timeouts shouldn't # slow down the rest of the request queue, like it used to be in the past.