-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on defining an anonymous serializer class #353
Comments
ThomasSevestre
pushed a commit
to ThomasSevestre/fast_jsonapi
that referenced
this issue
Sep 13, 2019
ThomasSevestre
pushed a commit
to ThomasSevestre/fast_jsonapi
that referenced
this issue
Sep 13, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a baseclass
ApiSerializer
with the shared behaviour of all subclasses.In our testsuite we use an anonymous subclass of
ApiSerializer
to test some behaviour.I.e. like this:
This gives me an error:
ObjectSerializer tries to determine the record type based on the class name, but does not take into account that the class can be unnamed:
if self.name.end_with?('Serializer')
The text was updated successfully, but these errors were encountered: