Open edtjones opened 8 years ago
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.
For some reason this works:
But this doesn't:
In reality we'll spend most of the time doing the former, but the latter should definitely work.