- 
                Notifications
    You must be signed in to change notification settings 
- Fork 63
Open
Description
Something similar was briefly mentioned here:
#68 (comment)
When a relation contains an item of an STI type jsonapi-rails isn't able to infer the renderer for it and instead it only crashes with the error:
ActiveModel::UnknownAttributeError:
       unknown attribute 'url_helpers' for PrimarySubject.
At the very least a helpful error message would go a long way here, as this is difficult to debug yourself.
The workaround is to manually specify all classes:
{
          Subject: SerializableSubject,
          PrimarySubject: SerializableSubject
          SecondarySubject: SerializableSubject
          ModernLanguagesSubject: SerializableSubject,
          FurtherEducationSubject: SerializableSubject
}
Metadata
Metadata
Assignees
Labels
No labels