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/design/layout.rb

25 lines
367 B
Ruby
Raw Normal View History

class Layout < DesignFile
2011-12-23 10:34:21 +00:00
include ParserLayout
attr_reader :content
2011-09-01 01:12:41 +00:00
embeds_one :menu
embedded_in :design
embeds_many :layout_parts
after_save :parse_layout
2011-05-18 02:00:00 +00:00
def content
self.file.read.force_encoding("UTF-8") rescue ''
end
2011-08-10 09:28:10 +00:00
2011-05-18 02:00:00 +00:00
def self.exist_one?
Layout.count > 0
end
2011-08-10 09:28:10 +00:00
def parse_layout
parse_layout_contents(self)
2011-08-10 09:28:10 +00:00
end
2011-03-08 09:25:46 +00:00
end