mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Always use plural for linked types
Although spec is agnostic about inflection rules, examples given are plural
This commit is contained in:
@@ -32,8 +32,8 @@ module ActiveModel
|
||||
id: "1",
|
||||
links: {
|
||||
comments: { linkage: [] },
|
||||
blog: { linkage: { type: "blog", id: "999" } },
|
||||
author: { linkage: { type: "author", id: "1" } }
|
||||
blog: { linkage: { type: "blogs", id: "999" } },
|
||||
author: { linkage: { type: "authors", id: "1" } }
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -42,8 +42,8 @@ module ActiveModel
|
||||
id: "2",
|
||||
links: {
|
||||
comments: { linkage: [] },
|
||||
blog: { linkage: { type: "blog", id: "999" } },
|
||||
author: { linkage: { type: "author", id: "1" } }
|
||||
blog: { linkage: { type: "blogs", id: "999" } },
|
||||
author: { linkage: { type: "authors", id: "1" } }
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -59,16 +59,16 @@ module ActiveModel
|
||||
title: "Hello!!",
|
||||
links: {
|
||||
comments: { linkage: [] },
|
||||
blog: { linkage: { type: "blog", id: "999" } },
|
||||
author: { linkage: { type: "author", id: "1" } }
|
||||
blog: { linkage: { type: "blogs", id: "999" } },
|
||||
author: { linkage: { type: "authors", id: "1" } }
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "New Post",
|
||||
links: {
|
||||
comments: { linkage: [] },
|
||||
blog: { linkage: { type: "blog", id: "999" } },
|
||||
author: { linkage: { type: "author", id: "1" } }
|
||||
blog: { linkage: { type: "blogs", id: "999" } },
|
||||
author: { linkage: { type: "authors", id: "1" } }
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user