widget structure improvised…

This commit is contained in:
Harry Bomrah committed 2012-05-07 19:00:50 +08:00
1 parent fcc875bb5d
commit 2083e0bf4f
46 files changed
+54 -338

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
class DesktopWidget
include Mongoid::Document
include Mongoid::Timestamps
field :name
field :author
field :shape
field :user_id
belongs_to :user
end
+1
View File
@@ -19,6 +19,7 @@ class User
has_one :desktop, :autosave => true, :dependent => :destroy
has_many :other_accounts, :autosave => true, :dependent => :destroy
has_many :journals, :autosave => true, :dependent => :destroy
has_many :desktop_widgets, :autosave => true, :dependent => :destroy
belongs_to :role
has_and_belongs_to_many :sub_roles
accepts_nested_attributes_for :attribute_values, :allow_destroy => true