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

25 lines
346 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_id
self.layout_name = Layout.find(layout_id).name
end
end
end