From aa3d28c641d3d17eea4db39637ebdb6fba938dec Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 22 Jul 2023 12:23:14 -0700 Subject: [PATCH] Update syntax for set_inheritance_column --- app/models/item.rb | 3 ++- app/models/swf_asset.rb | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/item.rb b/app/models/item.rb index f34314ca..3c1b9302 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -1,7 +1,8 @@ class Item < ActiveRecord::Base include PrettyParam - set_inheritance_column 'inheritance_type' # PHP Impress used "type" to describe category + # We use the `type` column to mean something other than what Rails means! + self.inheritance_column = nil SwfAssetType = 'object' diff --git a/app/models/swf_asset.rb b/app/models/swf_asset.rb index 962629e8..6cad40a3 100644 --- a/app/models/swf_asset.rb +++ b/app/models/swf_asset.rb @@ -3,6 +3,9 @@ require 'uri' require 'utf8' class SwfAsset < ActiveRecord::Base + # We use the `type` column to mean something other than what Rails means! + self.inheritance_column = nil + PUBLIC_ASSET_DIR = File.join('swfs', 'outfit') LOCAL_ASSET_DIR = Rails.root.join('public', PUBLIC_ASSET_DIR) IMAGE_BUCKET = IMPRESS_S3.bucket('impress-asset-images') @@ -16,8 +19,6 @@ class SwfAsset < ActiveRecord::Base # asset proxy instead. NEOPETS_IMAGES_URL_ORIGIN = ENV['NEOPETS_IMAGES_URL_ORIGIN'] || 'http://images.neopets.com' - set_inheritance_column 'inheritance_type' - IMAGE_SIZES = { :small => [150, 150], :medium => [300, 300],