class Mm::KudoResource < JSONAPI::Resource
model_name 'Mm::Kudo'
attributes :value, :tags, :comment
has_one :giver, class_name: '::Contractor', controller: '/contractors'
end
class ContractorResource < JSONAPI::Resource
model_name 'Coworker'
has_many :kudos_given, class_name: 'Mm::Kudo', controller: 'mm/kudos'
end
When parse_to_one_relationship try to guess relationship_resource it should first look on the relationship.class_name, and only if its not defined take it from the type.
When
parse_to_one_relationship
try to guess relationship_resource it should first look on the relationship.class_name, and only if its not defined take it from the type.