object_auth change to reload
This commit is contained in:
1 parent
ae48ab5cbd
commit
e67ca84282
3 files changed
+7
-9
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user