orbit-basic/app/models/layout.rb

15 lines
194 B
Ruby

class Layout < DesignFile
embedded_in :design
attr_reader :content
has_many :layout_parts
def content
self.file.read
end
def self.exist_one?
Layout.count > 0
end
end