Closed
Description
Currently this does not work:
[1] pry(#<PostTest>)> post = Post.new(name: "foo", core_post_id: 1, searchable: true, relationships: {user: User.find(1).first})
=> #<Post:@attributes={"type"=>"posts", "name"=>"foo", "body"="bar"}>
[2] pry(#<PostTest>)> post.save
NoMethodError: undefined method `as_json_api' for #<Hash:0x00007fc2e3a04968>
Did you mean? as_json
from /Users/mjc/.gem/ruby/2.6.0/gems/json_api_client-1.5.3/lib/json_api_client/resource.rb:500:in `relationships_for_serialization'
I tried fiddling with things but this seems to be the expected syntax. I also noticed that there are no tests for this functionality.
Metadata
Metadata
Assignees
Labels
No labels