From 8ad015af7f51ffbffc6b585cf45230065bcee5bc Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 13 Sep 2013 11:56:57 +0800 Subject: [PATCH] Remove before filter in user.rb in addition to the previous fix (Fix for user and role relationship) --- app/models/user/user.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/models/user/user.rb b/app/models/user/user.rb index 661d8e72d..a2c7e2472 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -42,7 +42,6 @@ class User before_create :initialize_desktop before_save :rebuild_status_record - before_save :save_roles scope :remote_account, where(:nccu_id.ne => nil) scope :not_guest_user, all_of(:name.ne => "guest") @@ -273,10 +272,6 @@ class User end protected - def save_roles - # self.roles = self.sub_roles.collect{|t| t.role}.uniq - self.roles = self.roles.uniq - end def rebuild_status_record self.status_record = {}