Fetching desktop from db
This commit is contained in:
1 parent
eb219c14b7
commit
4875b339f8
24 files changed
+470
-41
No files matched your search
+6
-2
@@ -7,8 +7,12 @@ class Group
|
||||
before_create :initialize_tile
|
||||
|
||||
def initialize_tile
|
||||
self.tiles.build
|
||||
self.tiles.build
|
||||
self.tiles.build(data_category: "widget", data_content: "timetable", position: 1, shape: "w2 h2", title: "Tiime Table")
|
||||
self.tiles.build(data_category: "app", data_content: "quotes", position: 2, shape: "w1 h1", title: "Quotes")
|
||||
self.tiles.build(data_category: "widget", data_content: "weather", position: 3, shape: "w2 h2", title: "Weather")
|
||||
self.tiles.build(data_category: "widget", data_content: "clock", position: 4, shape: "w2 h1", title: "Clock")
|
||||
self.tiles.build(data_category: "app", data_content: "dailyenglish", position: 5, shape: "w1 h1", title: "Daily English Word")
|
||||
self.tiles.build(data_category: "widget", data_content: "school_events", position: 6, shape: "w2 h1", title: "School Events")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -2,6 +2,12 @@ class Tile
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
field :data_category
|
||||
field :data_content
|
||||
field :position, type: Integer
|
||||
field :shape
|
||||
field :title
|
||||
|
||||
belongs_to :group
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user