impress/app/models/parent_swf_asset_relationship.rb

20 lines
358 B
Ruby
Raw Permalink Normal View History

class ParentSwfAssetRelationship < ApplicationRecord
2023-07-22 12:36:04 -07:00
self.table_name = 'parents_swf_assets'
belongs_to :parent, :polymorphic => true
2011-01-27 13:35:46 -08:00
belongs_to :swf_asset
def item=(replacement)
self.parent = replacement
2010-05-16 17:45:30 -07:00
end
def pet_state
2011-01-27 13:35:46 -08:00
PetState.find(parent_id)
2010-05-16 17:45:30 -07:00
end
def pet_state=(replacement)
self.parent = replacement
end
end