{"action":"closed","issue":{"url":"https://api.github.com/repos/beauby/jsonapi_parser/issues/9","repository_url":"https://api.github.com/repos/beauby/jsonapi_parser","labels_url":"https://api.github.com/repos/beauby/jsonapi_parser/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/beauby/jsonapi_parser/issues/9/comments","events_url":"https://api.github.com/repos/beauby/jsonapi_parser/issues/9/events","html_url":"https://github.com/beauby/jsonapi_parser/issues/9","id":150727896,"number":9,"title":"Error using #to_activerecord_hash","user":{"login":"rderoldan1","id":968973,"avatar_url":"https://avatars.githubusercontent.com/u/968973?v=3","gravatar_id":"","url":"https://api.github.com/users/rderoldan1","html_url":"https://github.com/rderoldan1","followers_url":"https://api.github.com/users/rderoldan1/followers","following_url":"https://api.github.com/users/rderoldan1/following{/other_user}","gists_url":"https://api.github.com/users/rderoldan1/gists{/gist_id}","starred_url":"https://api.github.com/users/rderoldan1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rderoldan1/subscriptions","organizations_url":"https://api.github.com/users/rderoldan1/orgs","repos_url":"https://api.github.com/users/rderoldan1/repos","events_url":"https://api.github.com/users/rderoldan1/events{/privacy}","received_events_url":"https://api.github.com/users/rderoldan1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-25T02:18:34Z","updated_at":"2016-04-25T14:08:41Z","closed_at":"2016-04-25T14:08:41Z","body":"I get this error while using this _to_activerecord_hash_ (related to #7 )\r\n\r\n```bash\r\nNoMethodError: undefined method `[]' for nil:NilClass\r\n\tfrom /var/lib/gems/2.2.0/gems/jsonapi_parser-0.5.5/lib/json/api/resource/active_record.rb:142:in `filter_keys'\r\n\tfrom /var/lib/gems/2.2.0/gems/jsonapi_parser-0.5.5/lib/json/api/resource/active_record.rb:82:in `attributes_for_activerecord_hash'\r\n\tfrom /var/lib/gems/2.2.0/gems/jsonapi_parser-0.5.5/lib/json/api/resource/active_record.rb:72:in `to_activerecord_hash'\r\n```\r\n\r\nThe related object is \r\n```ruby\r\n#<JSON::API::Resource:0x00000006905528\r\n @attributes=\r\n  #<JSON::API::Attributes:0x00000006905398\r\n   @attributes=\r\n    {\"name\"=>nil,\r\n     \"tax_id\"=>\"19818\",\r\n     \"description\"=>nil,\r\n     \"image_url\"=>nil,\r\n     \"preferred_name\"=>\"PALMER SECOND BAPTIST CHURCH\",\r\n     \"created_at\"=>\"2016-03-28T18:41:34.000Z\",\r\n     \"updated_at\"=>\"2016-03-28T18:41:34.000Z\",\r\n     \"json_data\"=>{\"deductibility\"=>1, \"sort_name\"=>3514},\r\n     \"type_of_cause\"=>nil,\r\n     \"images\"=>[],\r\n     \"primary_image\"=>nil}>,\r\n @attributes_hash=\r\n  {\"name\"=>nil,\r\n   \"tax_id\"=>\"19818\",\r\n   \"description\"=>nil,\r\n   \"image_url\"=>nil,\r\n   \"preferred_name\"=>\"PALMER SECOND BAPTIST CHURCH\",\r\n   \"created_at\"=>\"2016-03-28T18:41:34.000Z\",\r\n   \"updated_at\"=>\"2016-03-28T18:41:34.000Z\",\r\n   \"json_data\"=>{\"deductibility\"=>1, \"sort_name\"=>3514},\r\n   \"type_of_cause\"=>nil,\r\n   \"images\"=>[],\r\n   \"primary_image\"=>nil},\r\n @id=\"472\",\r\n @id_optional=true,\r\n @links=#<JSON::API::Links:0x000000068c3f88 @links={}>,\r\n @links_hash={},\r\n @options={},\r\n @relationships=#<JSON::API::Relationships:0x000000069040d8 @relationships={}>,\r\n @relationships_hash={},\r\n @type=\"causes\">\r\n```"}}