This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/models/page.rb

22 lines
367 B
Ruby

class Page < Item
include LayoutSupport
key_i18n :content, String
key :layout_name, String, :required => true
key :layout_id, ObjectId, :required => true
belongs_to :layout
protected
def setup_default_value
super
if self.layout_name
self.layout_id = Layout.find_by_name( self.layout_name ).id
end
end
end