Closed derekgstevens closed 6 years ago
@derekgstevens Have you found the source of the error? It looks like your SerializableUser
is not being autoloaded because the constant name does not match the file name (user_serializer.rb
).
@beauby yes, that was a silly mistake I made! Unfortunately, fixing that resulted in a different issue: "can't convert Symbol to Integer", also coming from serializable/renderer.rb:88. Haven't really had a chance to dig into it, however.
Thanks!
Ruby: 2.4.2 Rails: 5.1.4
I get the title error with the following stracktrace when trying to call
render jsonapi: user
My UserController looks like this:
And my user_serializer.rb
I have also tried namespacing my SerializableUser with
module Api::V1
but no luck. Any ideas what I'm doing wrong? I can see in the logs that the user is being created, and if I attempt to register the same user, the jsonapi_errors call works as expected: