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/desktop/widget_layout.rb

19 lines
240 B
Ruby
Raw Normal View History

2012-11-01 12:42:40 +00:00
class WidgetLayout < DesignFile
attr_reader :content
field :body
belongs_to :desktop_widget
def content
self.file.read.force_encoding("UTF-8") rescue ''
end
def self.exist_one?
WidgetLayout.count > 0
end
end