From 1e6ff4cefcf955ba04450418bbdf955bc9e581dd Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Tue, 20 Feb 2024 16:57:45 -0800 Subject: [PATCH] Remove the Item::Translation model entirely Okay, Impress 2020 is migrated off translations too, so we can start to wrap this up! --- app/models/item.rb | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/app/models/item.rb b/app/models/item.rb index ae6560f8..2298fb87 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -5,13 +5,6 @@ class Item < ApplicationRecord self.inheritance_column = nil SwfAssetType = 'object' - - # Keep the reference to the deprecated `Item::Translation` record, but don't - # bind it directly to any attributes anymore. We have some temporary writers - # that hack around the API to keep the attributes synced, while no longer - # reading *from* them by default. - # TODO: Remove once we're all done with translations, both here and in 2020! - translates has_many :closet_hangers has_one :contribution, :as => :contributed, :inverse_of => :contributed @@ -112,24 +105,6 @@ class Item < ApplicationRecord distinct } - # Temporary writers to keep the English translation record updated, while - # primarily using the attributes on the model itself. - # - # Once this app and DTI 2020 are both comfortably off the translation system, - # we can remove this! - def name=(new_name) - globalize.write(:en, :name, new_name) - write_attribute(:name, new_name) - end - def description=(new_description) - globalize.write(:en, :description, new_description) - write_attribute(:description, new_description) - end - def rarity=(new_rarity) - globalize.write(:en, :rarity, new_rarity) - write_attribute(:rarity, new_rarity) - end - def nc_trade_value return nil unless nc? begin