orbit-basic/app/models/component.rb

22 lines
374 B
Ruby
Raw Normal View History

class Component < Item
include LayoutSupport
key :engine_name, String
key :layout_name, String, :required => true
2010-02-05 08:53:52 +00:00
key :layout_id, ObjectId, :required => true
2010-01-28 09:42:55 +00:00
belongs_to :layout
2010-02-05 08:53:52 +00:00
protected
def setup_default_value
super
if self.layout_name
self.layout_id = Layout.find_by_name( self.layout_name ).id
end
end
end