From f63cc0979130fc678da1f7d15245e579d3179b88 Mon Sep 17 00:00:00 2001
From: Joe Bloom <169075239+joebloomreach@users.noreply.github.com>
Date: Wed, 9 Oct 2024 13:57:09 -0400
Subject: [PATCH] Corrected syntax for defining the foreign key reference model
 using ref()

Code sample indicated to use `to: "{{ ref('other_model_name) }}"' which results in "Compilation error [...] 'ref' is undefined"

Using `to: ref('other_model_name')` parses correctly.
---
 website/docs/reference/resource-properties/constraints.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/website/docs/reference/resource-properties/constraints.md b/website/docs/reference/resource-properties/constraints.md
index ed38132c367..63582974040 100644
--- a/website/docs/reference/resource-properties/constraints.md
+++ b/website/docs/reference/resource-properties/constraints.md
@@ -47,7 +47,7 @@ models:
         columns: [first_column, second_column, ...]
       - type: foreign_key # multi_column
         columns: [first_column, second_column, ...]
-        to: "{{ ref('other_model_name') }}"
+        to: ref('other_model_name')
         to_columns: [other_model_first_column, other_model_second_columns, ...]
       - type: check
         columns: [first_column, second_column, ...]
@@ -64,7 +64,7 @@ models:
           - type: not_null
           - type: unique
           - type: foreign_key
-            to: "{{ ref('other_model_name') }}"
+            to: ref('other_model_name')
             to_columns: other_model_column
           - type: ...
 ```