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.
|
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
|