{"action":"created","issue":{"url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/248","labels_url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/248/comments","events_url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/248/events","html_url":"https://github.com/CanCanCommunity/cancancan/issues/248","id":104500748,"number":248,"title":"Nested resource authorization fails with mongoid","user":{"login":"zeitnot","id":1460930,"avatar_url":"https://avatars.githubusercontent.com/u/1460930?v=3","gravatar_id":"","url":"https://api.github.com/users/zeitnot","html_url":"https://github.com/zeitnot","followers_url":"https://api.github.com/users/zeitnot/followers","following_url":"https://api.github.com/users/zeitnot/following{/other_user}","gists_url":"https://api.github.com/users/zeitnot/gists{/gist_id}","starred_url":"https://api.github.com/users/zeitnot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeitnot/subscriptions","organizations_url":"https://api.github.com/users/zeitnot/orgs","repos_url":"https://api.github.com/users/zeitnot/repos","events_url":"https://api.github.com/users/zeitnot/events{/privacy}","received_events_url":"https://api.github.com/users/zeitnot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-02T15:00:26Z","updated_at":"2015-09-09T11:56:56Z","closed_at":null,"body":"I am using `rails ~> 4.2.3`, `mongoid ~> 4.0.1` and `cancancan ~> 1.12.0`. \r\n\r\nThe following implementation fails and throws 403 status code.\r\n\r\n```ruby\r\nload_and_authorize_resource :project\r\nload_and_authorize_resource :task, through: :project_id, class: Project::Task\r\n```\r\n\r\nThere a `Project` and it has many `Task`. I want to reach `task` record through `project` but I could not. Maybe I am wrong somewhere and I need some help. "},"comment":{"url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/comments/138887274","html_url":"https://github.com/CanCanCommunity/cancancan/issues/248#issuecomment-138887274","issue_url":"https://api.github.com/repos/CanCanCommunity/cancancan/issues/248","id":138887274,"user":{"login":"zeitnot","id":1460930,"avatar_url":"https://avatars.githubusercontent.com/u/1460930?v=3","gravatar_id":"","url":"https://api.github.com/users/zeitnot","html_url":"https://github.com/zeitnot","followers_url":"https://api.github.com/users/zeitnot/followers","following_url":"https://api.github.com/users/zeitnot/following{/other_user}","gists_url":"https://api.github.com/users/zeitnot/gists{/gist_id}","starred_url":"https://api.github.com/users/zeitnot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeitnot/subscriptions","organizations_url":"https://api.github.com/users/zeitnot/orgs","repos_url":"https://api.github.com/users/zeitnot/repos","events_url":"https://api.github.com/users/zeitnot/events{/privacy}","received_events_url":"https://api.github.com/users/zeitnot/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T11:56:56Z","updated_at":"2015-09-09T11:56:56Z","body":"403"}}