From 829d960d700edc1db5fc2be4be273c25dd9a3be7 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sat, 24 Feb 2024 15:24:24 -0800 Subject: [PATCH] Move `SwfAsset#override_body_id` to the bottom of the file This is a console-y method, it's not important enough to be up here! --- app/models/swf_asset.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/models/swf_asset.rb b/app/models/swf_asset.rb index a3bbf675..8f2878df 100644 --- a/app/models/swf_asset.rb +++ b/app/models/swf_asset.rb @@ -52,13 +52,6 @@ class SwfAsset < ApplicationRecord "#{image_version}" end - # To manually change the body ID without triggering the usual change to 0, - # use this override method. - def override_body_id(new_body_id) - @body_id_overridden = true - self.body_id = new_body_id - end - def as_json(options={}) super({ only: [:id, :known_glitches], @@ -179,6 +172,13 @@ class SwfAsset < ApplicationRecord self.manifest_url = parsed_manifest_url.to_s end + # To manually change the body ID without triggering the usual change to 0, + # use this override method. (This is intended for use from the console.) + def override_body_id(new_body_id) + @body_id_overridden = true + self.body_id = new_body_id + end + def self.from_biology_data(body_id, data) remote_id = data[:part_id].to_i swf_asset = SwfAsset.find_or_initialize_by type: 'biology',