very important update for widgets management..

This commit is contained in:
Harry Bomrah committed 2012-05-11 15:27:16 +08:00
1 parent 2083e0bf4f
commit 2c3637e9b4
8 files changed
+200 -15

No files matched your search

+1
View File
@@ -9,6 +9,7 @@ class Desktop
belongs_to :user
has_many :sections, :autosave => true, :dependent => :destroy
has_many :desktop_widgets, :autosave => true, :dependent => :destroy
before_create :initialize_section
+4 -2
View File
@@ -5,7 +5,9 @@ class DesktopWidget
field :name
field :author
field :shape
field :user_id
field :desktop_id
field :status
field :section
belongs_to :user
belongs_to :desktop
end
+1 -1
View File
@@ -19,7 +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