diff --git a/app/models/color.rb b/app/models/color.rb index 13575141..94a2b5f1 100644 --- a/app/models/color.rb +++ b/app/models/color.rb @@ -1,5 +1,4 @@ class Color < ApplicationRecord - translates # TODO: Remove once we're all done with translations! has_many :pet_types scope :alphabetical, -> { order(:name) } @@ -9,16 +8,6 @@ class Color < ApplicationRecord scope :funny, -> { order(:prank) unless pranks_funny? } validates :name, presence: true - - # Temporary writer to keep the English translation record updated, while - # primarily using the attribute 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 as_json(options={}) {id: id, name: name, human_name: human_name} diff --git a/app/models/species.rb b/app/models/species.rb index f8de694c..f00d9905 100644 --- a/app/models/species.rb +++ b/app/models/species.rb @@ -1,5 +1,4 @@ class Species < ApplicationRecord - translates # TODO: Remove once we're all done with translations! has_many :pet_types has_many :alt_styles @@ -9,16 +8,6 @@ class Species < ApplicationRecord pt = PetType.arel_table joins(:pet_types).where(pt[:body_id].eq(body_id)).limit(1) } - - # Temporary writer to keep the English translation record updated, while - # primarily using the attribute 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 as_json(options={}) super({only: [:id, :name], methods: [:human_name]}.merge(options)) diff --git a/app/models/zone.rb b/app/models/zone.rb index 902fd5bd..602f80f4 100644 --- a/app/models/zone.rb +++ b/app/models/zone.rb @@ -1,6 +1,4 @@ -class Zone < ActiveRecord::Base - translates # TODO: Remove once we're all done with translations! - +class Zone < ActiveRecord::Base # When selecting zones that an asset occupies, we allow the zone to set # whether or not the zone is "sometimes" occupied. This is false by default. attr_writer :sometimes @@ -11,26 +9,6 @@ class Zone < ActiveRecord::Base } scope :for_items, -> { where(arel_table[:type_id].gt(1)) } - # Temporary writer to keep the English translation record updated, while - # primarily using the attribute on the model itself. - # - # Once this app and DTI 2020 are both comfortably off the translation system, - # we can remove this! - def label=(new_label) - globalize.write(:en, :label, new_label) - write_attribute(:label, new_label) - end - - # Temporary writer to keep the English translation record updated, while - # primarily using the attribute on the model itself. - # - # Once this app and DTI 2020 are both comfortably off the translation system, - # we can remove this! - def plain_label=(new_plain_label) - globalize.write(:en, :plain_label, new_plain_label) - write_attribute(:plain_label, new_plain_label) - end - def as_json(options={}) super({only: [:id, :depth, :label]}.merge(options)) end