Skip to content
This repository was archived by the owner on Apr 4, 2022. It is now read-only.
This repository was archived by the owner on Apr 4, 2022. It is now read-only.

.find() doesn't correctly build a ResourceLinks::Collection #9

@edtjones

Description

@edtjones

For some reason this works:

Page.find_by(slug: 'sample-page').first.resource_links.collect(&:link_type)
# => ["self", "collection", "about", "author", "replies", "version-history", "https://api.w.org/attachment", "https://api.w.org/meta", "http://docs.rooftopcms.com/link_relations/children"] 

But this doesn't:

Page.find(2).resource_links.collect(&:link_type)
# => [nil, nil, nil, nil, nil, nil, nil, nil, nil]

In reality we'll spend most of the time doing the former, but the latter should definitely work.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions