2010-05-16 12:01:38 -07:00
|
|
|
class ParentSwfAssetRelationship < ActiveRecord::Base
|
|
|
|
set_table_name 'parents_swf_assets'
|
|
|
|
|
|
|
|
belongs_to :swf_asset
|
|
|
|
|
|
|
|
def item
|
|
|
|
parent
|
|
|
|
end
|
|
|
|
|
|
|
|
def item=(replacement)
|
2010-05-16 17:45:30 -07:00
|
|
|
self.parent_id = replacement.id
|
|
|
|
end
|
|
|
|
|
2010-05-20 18:11:08 -07:00
|
|
|
def pet_state
|
2010-05-16 17:45:30 -07:00
|
|
|
parent
|
|
|
|
end
|
|
|
|
|
2010-05-20 18:11:08 -07:00
|
|
|
def pet_state=(replacement)
|
2010-05-16 17:45:30 -07:00
|
|
|
self.parent_id = replacement.id
|
2010-05-16 12:01:38 -07:00
|
|
|
end
|
|
|
|
end
|