mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Always use plural for linked types
Although spec is agnostic about inflection rules, examples given are plural
This commit is contained in:
@@ -44,14 +44,14 @@ module ActiveModel
|
||||
id: "1",
|
||||
body: 'ZOMG A COMMENT',
|
||||
links: {
|
||||
post: { linkage: { type: "post", id: "1" } },
|
||||
post: { linkage: { type: "posts", id: "1" } },
|
||||
author: { linkage: nil }
|
||||
}
|
||||
}, {
|
||||
id: "2",
|
||||
body: 'ZOMG ANOTHER COMMENT',
|
||||
links: {
|
||||
post: { linkage: { type: "post", id: "1" } },
|
||||
post: { linkage: { type: "posts", id: "1" } },
|
||||
author: { linkage: nil }
|
||||
}
|
||||
}]
|
||||
@@ -63,13 +63,13 @@ module ActiveModel
|
||||
expected = [{
|
||||
id: "1",
|
||||
links: {
|
||||
post: { linkage: { type: "post", id: "1" } },
|
||||
post: { linkage: { type: "posts", id: "1" } },
|
||||
author: { linkage: nil }
|
||||
}
|
||||
}, {
|
||||
id: "2",
|
||||
links: {
|
||||
post: { linkage: { type: "post", id: "1" } },
|
||||
post: { linkage: { type: "posts", id: "1" } },
|
||||
author: { linkage: nil }
|
||||
}
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user