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 Desktop
|
|
include Mongoid::Document
|
|
include Mongoid::Timestamps
|
|
|
|
field :theme, default: "default"
|
|
|
|
belongs_to :user
|
|
has_many :sections, :autosave => true, :dependent => :destroy
|
|
|
|
before_create :initialize_section
|
|
|
|
def initialize_section
|
|
user.self.build_section
|
|
end
|
|
|
|
end |