{"action":"opened","issue":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/354","labels_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/354/labels{/name}","comments_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/354/comments","events_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/354/events","html_url":"https://github.com/cerebris/jsonapi-resources/issues/354","id":98828088,"number":354,"title":"Can't create a record with nested attribute","user":{"login":"lionelrudaz","id":592678,"avatar_url":"https://avatars.githubusercontent.com/u/592678?v=3","gravatar_id":"","url":"https://api.github.com/users/lionelrudaz","html_url":"https://github.com/lionelrudaz","followers_url":"https://api.github.com/users/lionelrudaz/followers","following_url":"https://api.github.com/users/lionelrudaz/following{/other_user}","gists_url":"https://api.github.com/users/lionelrudaz/gists{/gist_id}","starred_url":"https://api.github.com/users/lionelrudaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lionelrudaz/subscriptions","organizations_url":"https://api.github.com/users/lionelrudaz/orgs","repos_url":"https://api.github.com/users/lionelrudaz/repos","events_url":"https://api.github.com/users/lionelrudaz/events{/privacy}","received_events_url":"https://api.github.com/users/lionelrudaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-03T20:02:53Z","updated_at":"2015-08-03T20:02:53Z","closed_at":null,"body":"Hi guys,\r\n\r\nThis is probably a newbie question, but I haven't found anything similar in previous issues, so I don't know what I do wrong.\r\n\r\nI'm trying to create a Search that has a Category in my API. I'm creating a custom search_controller because I need some specific features on my search API.\r\n\r\nHere's the resource:\r\n\r\n```\r\nmodule Api\r\n  module V1\r\n    class SearchResource < JSONAPI::Resource\r\n      attributes :lat, :lon, :radius, :first_doctor, :first_doctor_first_availability, :first_doctor_first_slot\r\n      has_one :category\r\n    end\r\n  end\r\nend\r\n```\r\n\r\nAnd the payload I'm sending:\r\n\r\n```\r\n{\"data\":{\"attributes\":{\"lat\":46.6143844,\"lon\":6.508884500000022,\"radius\":null},\"category\":{\"data\":{\"id\":\"1\",\"attributes\":{\"title\":\"General Medicine\",\"description\":null,\"rank\":0,\"created-at\":null,\"updated-at\":null},\"type\":\"categories\"}},\"type\":\"searches\"}}\r\n```\r\n\r\nI get the following error:\r\n\r\n```\r\n{\"errors\":[{\"title\":\"Param not allowed\",\"detail\":\"category is not allowed.\",\"id\":null,\"href\":null,\"code\":105,\"source\":null,\"links\":null,\"status\":\"bad_request\"}]}\r\n```\r\n\r\nThere's probably something really silly I'm doing wrong. Any ideas?\r\n\r\nLet me know if you need more information.\r\n\r\nThanks in advance"}}