class Layout < DesignFile
include Parser
embedded_in :design
attr_reader :content
has_many :layout_parts
def content
self.file.read
end
def self.exist_one?
Layout.count > 0
after_save:parse_layout
def parse_layout
parse_layout_layout_part(self)