Dock change and getting values from db
This commit is contained in:
1 parent
b2c9229099
commit
7309d9c446
145 files changed
+218
-55
No files matched your search
@@ -10,7 +10,10 @@ class Desktop
|
||||
before_create :initialize_section
|
||||
|
||||
def initialize_section
|
||||
user.self.build_section
|
||||
self.sections.build(name: "Desktop 1")
|
||||
self.sections.build(name: "Desktop 2")
|
||||
self.sections.build(name: "Desktop 3")
|
||||
self.sections.build(name: "Desktop 4")
|
||||
end
|
||||
|
||||
end
|
||||
+2
-1
@@ -7,7 +7,8 @@ class Group
|
||||
before_create :initialize_tile
|
||||
|
||||
def initialize_tile
|
||||
self.build_tile
|
||||
self.tiles.build
|
||||
self.tiles.build
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@ class Section
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
field :name, default: "Section"
|
||||
field :name
|
||||
|
||||
belongs_to :desktop
|
||||
has_many :groups, :autosave => true, :dependent => :destroy
|
||||
@@ -10,7 +10,8 @@ class Section
|
||||
before_create :initialize_group
|
||||
|
||||
def initialize_group
|
||||
self.build_group
|
||||
self.groups.build
|
||||
self.groups.build
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user