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

24 lines
378 B
Ruby

class Page < Item
#include LayoutSupport
field :content
field :layout_name
field :layout_id
validates_presence_of :layout_name, :layout_id
referenced_in :layout
protected
def setup_default_value
super
if self.layout_name
self.layout_id = Layout.first(:conditions => {:name => self.layout_name} ).id
end
end
end