Complete for 229 check.

This commit is contained in:
Matt Fu committed 2012-02-24 19:07:47 +08:00
1 parent 678f1eabef
commit 3209f9aa27
10 files changed
+187 -5

No files matched your search

+3
View File
@@ -22,6 +22,9 @@ class User
has_and_belongs_to_many :sub_roles
accepts_nested_attributes_for :attribute_values, :allow_destroy => true
scope :remote_account, where(:nccu_id.ne => nil)
def avb_apps
sub_role_ids_ary=self.sub_roles.collect{|t| t.id}
query1 = AppAuth.any_in({sub_role_ids: sub_role_ids_ary}).excludes(blocked_user_ids: self.id)