``` ruby class Resource < Daylight::API belongs_to :owner end ``` ActiveResource supports (https://github.com/rails/activeresource/pull/50) resolving a `belongs_to` association via a foreign key: ``` json r = Resource.first => { ... "owner_id": 42 } ``` or through the attribute name: ``` json r = Resource.first => { ... "owner": { ... } } ``` It looks like Daylight is failing on the latter since it expects the foreign key to be present. Relevant line: https://github.com/adore/daylight/blob/cfd213517278cc61b5f971c71cafced355aef975/lib/daylight/associations.rb#L101
ActiveResource supports (rails/activeresource#50) resolving a
belongs_toassociation via a foreign key:or through the attribute name:
It looks like Daylight is failing on the latter since it expects the foreign key to be present.
Relevant line:
daylight/lib/daylight/associations.rb
Line 101 in cfd2135