forked from OpenNeo/impress
Disable modeling while we fix Alt Styles rollout bugs
This commit is contained in:
parent
09ad6d5fbb
commit
b1eca2f3a5
4 changed files with 14 additions and 2 deletions
|
@ -2,6 +2,7 @@ class PetsController < ApplicationController
|
||||||
rescue_from Pet::PetNotFound, :with => :pet_not_found
|
rescue_from Pet::PetNotFound, :with => :pet_not_found
|
||||||
rescue_from PetType::DownloadError, SwfAsset::DownloadError, :with => :asset_download_error
|
rescue_from PetType::DownloadError, SwfAsset::DownloadError, :with => :asset_download_error
|
||||||
rescue_from Pet::DownloadError, :with => :pet_download_error
|
rescue_from Pet::DownloadError, :with => :pet_download_error
|
||||||
|
rescue_from Pet::ModelingDisabled, with: :modeling_disabled
|
||||||
|
|
||||||
def load
|
def load
|
||||||
raise Pet::PetNotFound unless params[:name]
|
raise Pet::PetNotFound unless params[:name]
|
||||||
|
@ -74,4 +75,9 @@ class PetsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def modeling_disabled
|
||||||
|
pet_load_error long_message: t('pets.load.modeling_disabled'),
|
||||||
|
status: :forbidden
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,7 +17,9 @@ class Pet < ApplicationRecord
|
||||||
joins(:pet_type).where(PetType.arel_table[:id].in(color_ids))
|
joins(:pet_type).where(PetType.arel_table[:id].in(color_ids))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ModelingDisabled < RuntimeError;end
|
||||||
def load!(options={})
|
def load!(options={})
|
||||||
|
raise ModelingDisabled
|
||||||
options[:locale] ||= I18n.default_locale
|
options[:locale] ||= I18n.default_locale
|
||||||
I18n.with_locale(options.delete(:locale)) do
|
I18n.with_locale(options.delete(:locale)) do
|
||||||
use_viewer_data(fetch_viewer_data(options.delete(:timeout)), options)
|
use_viewer_data(fetch_viewer_data(options.delete(:timeout)), options)
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
|
|
||||||
= advertise_campaign_progress @campaign
|
= advertise_campaign_progress @campaign
|
||||||
|
|
||||||
.notice
|
.warning
|
||||||
%strong Happy NC UC day!
|
%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'
|
%p#pet-not-found.alert= t 'pets.load.not_found'
|
||||||
|
|
||||||
|
|
|
@ -781,6 +781,9 @@ en:
|
||||||
pet_download_error:
|
pet_download_error:
|
||||||
We couldn't connect to Neopets to look up the pet. Maybe they're down.
|
We couldn't connect to Neopets to look up the pet. Maybe they're down.
|
||||||
Please try again later!
|
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:
|
swf_assets:
|
||||||
links:
|
links:
|
||||||
|
|
Loading…
Reference in a new issue