1
0
Fork 0
forked from OpenNeo/impress

Disable modeling while we fix Alt Styles rollout bugs

This commit is contained in:
Emi Matchu 2024-01-24 00:19:28 -08:00
parent 09ad6d5fbb
commit b1eca2f3a5
4 changed files with 14 additions and 2 deletions

View file

@ -2,6 +2,7 @@ class PetsController < ApplicationController
rescue_from Pet::PetNotFound, :with => :pet_not_found
rescue_from PetType::DownloadError, SwfAsset::DownloadError, :with => :asset_download_error
rescue_from Pet::DownloadError, :with => :pet_download_error
rescue_from Pet::ModelingDisabled, with: :modeling_disabled
def load
raise Pet::PetNotFound unless params[:name]
@ -74,4 +75,9 @@ class PetsController < ApplicationController
end
end
end
def modeling_disabled
pet_load_error long_message: t('pets.load.modeling_disabled'),
status: :forbidden
end
end

View file

@ -17,7 +17,9 @@ class Pet < ApplicationRecord
joins(:pet_type).where(PetType.arel_table[:id].in(color_ids))
}
class ModelingDisabled < RuntimeError;end
def load!(options={})
raise ModelingDisabled
options[:locale] ||= I18n.default_locale
I18n.with_locale(options.delete(:locale)) do
use_viewer_data(fetch_viewer_data(options.delete(:timeout)), options)

View file

@ -2,9 +2,10 @@
= advertise_campaign_progress @campaign
.notice
.warning
%strong Happy NC UC day!
We're working on some changes to get everything set up, see you soon! 💖
We've temporarily disabled pet loading while we get everything set up and
investigate some new compatibility issues. We'll have it back soon!
%p#pet-not-found.alert= t 'pets.load.not_found'

View file

@ -781,6 +781,9 @@ en:
pet_download_error:
We couldn't connect to Neopets to look up the pet. Maybe they're down.
Please try again later!
modeling_disabled: We've turned off pet loading for a bit, while we
investigate some changes in how it works. We'll be back as soon as we
can!
swf_assets:
links: