{"action":"created","issue":{"url":"https://api.github.com/repos/abuiles/ember-watson/issues/79","labels_url":"https://api.github.com/repos/abuiles/ember-watson/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/abuiles/ember-watson/issues/79/comments","events_url":"https://api.github.com/repos/abuiles/ember-watson/issues/79/events","html_url":"https://github.com/abuiles/ember-watson/issues/79","id":104258283,"number":79,"title":"convert-resource-router-mapping","user":{"login":"SamvelRaja","id":5114052,"avatar_url":"https://avatars.githubusercontent.com/u/5114052?v=3","gravatar_id":"","url":"https://api.github.com/users/SamvelRaja","html_url":"https://github.com/SamvelRaja","followers_url":"https://api.github.com/users/SamvelRaja/followers","following_url":"https://api.github.com/users/SamvelRaja/following{/other_user}","gists_url":"https://api.github.com/users/SamvelRaja/gists{/gist_id}","starred_url":"https://api.github.com/users/SamvelRaja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamvelRaja/subscriptions","organizations_url":"https://api.github.com/users/SamvelRaja/orgs","repos_url":"https://api.github.com/users/SamvelRaja/repos","events_url":"https://api.github.com/users/SamvelRaja/events{/privacy}","received_events_url":"https://api.github.com/users/SamvelRaja/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-01T12:48:22Z","updated_at":"2015-09-01T12:51:16Z","closed_at":null,"body":"While converting the resource router mapping\r\n\r\n```bash\r\nOh Dear! I wasn't able to save the following files:\r\napp/router.js - Cannot read property 'arguments' of undefined\r\n```\r\nMy router structure is\r\n\r\n```js\r\nRouter.map(function () {\r\n  this.resource('items', function () {\r\n    this.resource('item_details', {\r\n      path: '/:item_id'\r\n    }, function () {\r\n      if (AdminUser) {\r\n        this.route('create_subitem', {\r\n          path: '/new_sub_item'\r\n        });\r\n      }\r\n    });\r\n  });\r\n});\r\n\r\nexport default Router;\r\n```\r\n\r\nBut if i **remove**    `if (AdminUser)`  check, it works.\r\n\r\nIs this a know scenario? or needs a fix.\r\n\r\nMy use case is for certain routes i won't let the staff persons, hence i won't create a route for them at all, resulting them to take the unauthorized route by default.\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/abuiles/ember-watson/issues/comments/136705368","html_url":"https://github.com/abuiles/ember-watson/issues/79#issuecomment-136705368","issue_url":"https://api.github.com/repos/abuiles/ember-watson/issues/79","id":136705368,"user":{"login":"knownasilya","id":34726,"avatar_url":"https://avatars.githubusercontent.com/u/34726?v=3","gravatar_id":"","url":"https://api.github.com/users/knownasilya","html_url":"https://github.com/knownasilya","followers_url":"https://api.github.com/users/knownasilya/followers","following_url":"https://api.github.com/users/knownasilya/following{/other_user}","gists_url":"https://api.github.com/users/knownasilya/gists{/gist_id}","starred_url":"https://api.github.com/users/knownasilya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knownasilya/subscriptions","organizations_url":"https://api.github.com/users/knownasilya/orgs","repos_url":"https://api.github.com/users/knownasilya/repos","events_url":"https://api.github.com/users/knownasilya/events{/privacy}","received_events_url":"https://api.github.com/users/knownasilya/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T12:51:16Z","updated_at":"2015-09-01T12:51:16Z","body":"Usually that's not the way you block routes, it's usually done in the `beforeModel` hook of the routes you want to auth."}}