has_one relationships don't work for the ActiveRecord Adapter
Details
Within lib/jsonapi_compliable/adapters/active_record.rb, the associate method does not take into consideration has_one relationships. This results in the adapter hitting the final elsif and attempting to send association_name to the child, instead of the parent.
That means, for example, for the new model in this PR, you would end up seeing errors like:
NoMethodError: undefined method 'salary=' for #<Salary:0x007fe9ff8d25e8>
Issue
has_one
relationships don't work for the ActiveRecord AdapterDetails
Within
lib/jsonapi_compliable/adapters/active_record.rb
, theassociate
method does not take into considerationhas_one
relationships. This results in the adapter hitting the finalelsif
and attempting to sendassociation_name
to the child, instead of the parent.That means, for example, for the new model in this PR, you would end up seeing errors like:
NoMethodError: undefined method 'salary=' for #<Salary:0x007fe9ff8d25e8>