1
0
Fork 0
forked from OpenNeo/impress
impress/app/models/parent_swf_asset_relationship.rb

17 lines
346 B
Ruby
Raw Normal View History

class ParentSwfAssetRelationship < ActiveRecord::Base
set_table_name 'parents_swf_assets'
belongs_to :parent, :class_name => 'Item'
belongs_to :swf_asset
default_scope where(Table('parents_swf_assets')[:swf_asset_type].eq('object'))
def item
parent
end
def item=(replacement)
self.parent = replacement
end
end