errors.add(:Role, "already exists with selected permissions") if Role.all.map(&:access_ids).include?(self.access_ids)
这一切都运行得很好。现在,我需要获取与当前角色具有相同访问权限的角色。那么,我该怎么做呢?
headers: new Headers({ 'token': 'myToken'}) 获取时出错: Accessfrom origin 'myOrigin' has been blocked by CORS policy: Request header field token is not allowed by Access-Control