self.user.andand.uuid
end
def owner_uuid_was
- self.user_id_changed? ? User.find(self.user_id_was).andand.uuid : self.user.andand.uuid
+ self.user_id_changed? ? User.where(id: self.user_id_was).first.andand.uuid : self.user.andand.uuid
end
def owner_uuid_changed?
self.user_id_changed?
end
def modified_at=(x) end
+ def scopes_allow?(req_s)
+ scopes.each do |scope|
+ return true if (scope == 'all') or (scope == req_s) or
+ ((scope.end_with? '/') and (req_s.start_with? scope))
+ end
+ false
+ end
+
+ def scopes_allow_request?(request)
+ scopes_allow? [request.request_method, request.path].join(' ')
+ end
+
def logged_attributes
attrs = attributes.dup
attrs.delete('api_token')