Skip to content

Commit 3640b84

Browse files
committed
ref: add Union(A, B) examples to spec
Resolves #65
1 parent 23a40f2 commit 3640b84

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

spec/models.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class User
3434
type meta : Meta = DB::Default
3535

3636
type created_at : Time = DB::Default
37-
type updated_at : Union(Time | Nil)
37+
type updated_at : Union(Time, Nil)
3838

3939
type referrals : Array(User), foreign_key: "referrer_uuid"
4040
type authored_posts : Array(Post), foreign_key: "author_uuid"
@@ -58,7 +58,7 @@ class Post
5858
schema posts do
5959
pkey id : Int32
6060
type author : User, key: "author_uuid"
61-
type editor : Union(User | Nil), key: "editor_uuid"
61+
type editor : Union(User, Nil), key: "editor_uuid"
6262
type tags : Array(Tag) = DB::Default, key: "tag_ids"
6363

6464
type content : String

0 commit comments

Comments
 (0)