Destroy user_attributes and attribute_values when a user is destroyed

This commit is contained in:
chris2tof committed 2011-05-02 13:23:39 +08:00
1 parent 83bbd77d96
commit 43d87ecf98
3 files changed
+7 -2

No files matched your search

+1
View File
@@ -10,6 +10,7 @@ class User
field :admin, :type => Boolean, :default => true
field :active_roles, :type => Array
has_many :user_attributes
has_many :user_roles
has_many :user_infos
before_save :clean_active_roles