object_auth change to reload

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-10-04 18:20:21 +08:00
1 parent ae48ab5cbd
commit e67ca84282
3 files changed
+7 -9

No files matched your search

+4
View File
@@ -5,6 +5,10 @@ class ObjectAuth < PrototypeAuth
after_save :check_user_has_app_auth
# > - Something.find_with_auth(query)
# > - or Something.find(query).auth
def siblings
ObjectAuth.where({obj_authable_type: obj_authable_type,title: title})
end
def auth_obj
class_obj = eval(self.obj_authable_type)
class_obj.find self.obj_authable_id