Remove the Item::Translation model entirely
Okay, Impress 2020 is migrated off translations too, so we can start to wrap this up!
This commit is contained in:
parent
b7296d6a75
commit
1e6ff4cefc
1 changed files with 0 additions and 25 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue