You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 22, 2026. It is now read-only.
"etude" has a linkedDocument to "auteur" named "auteur"
"auteur" has several properties but I'm trying at least to get "nom" (StructuredText)
So when I try to get the study, it works : study = Prismic.api('https://****.prismic.io/api').query(Prismic::Predicates.at('document.type', 'etude')}).results[0]
Then I added the fetchlink : study = Prismic.api('https://****.prismic.io/api').query(Prismic::Predicates.at('document.type', 'etude'), {'fetchLinks' => 'auteur.nom'}).results[0]
I got an error pointing this line : undefined method "call' for nil:NilClass"
I tried to simply put "auteur" or "etude.auteur" and the error disapeared, but I'm unable to get the linked "auteur" as a top-level document. I tried those syntaxes, I always get an empty array or null :
Hello,
I'm trying to have this example working on my project :
https://prismic.io/docs/ruby/query-the-api/fetch-linked-document-fields
I have 2 custom types : "etude" and "auteur"
So when I try to get the study, it works :
study = Prismic.api('https://****.prismic.io/api').query(Prismic::Predicates.at('document.type', 'etude')}).results[0]Then I added the fetchlink :
study = Prismic.api('https://****.prismic.io/api').query(Prismic::Predicates.at('document.type', 'etude'), {'fetchLinks' => 'auteur.nom'}).results[0]I got an error pointing this line :
undefined method "call' for nil:NilClass"I tried to simply put "auteur" or "etude.auteur" and the error disapeared, but I'm unable to get the linked "auteur" as a top-level document. I tried those syntaxes, I always get an empty array or null :
author = study["etude.auteur-link"]--> nullauthor = study["etude.auteur"]--> []author = study["auteur.nom"]--> nullI can't have it work. Do you have any idea ?
Thanks