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
By default fast_jsonapi does not pluralize type names. You can turn pluralization on using this syntax:
176
+
177
+
```ruby
178
+
classAwardSerializer
179
+
includeFastJsonapi::ObjectSerializer
180
+
belongs_to :actor
181
+
pluralize_type true# "award" => "awards"
182
+
end
183
+
```
184
+
185
+
Relationship types are not automatically pluralized, even when their base types have `pluralize_type` set. Pluralization can be enabled in the relationship definition.
The most common use case for this feature is to easily migrate from serialization engines that pluralize by default, such as AMS.
195
+
173
196
### Attributes
174
197
Attributes are defined in FastJsonapi using the `attributes` method. This method is also aliased as `attribute`, which is useful when defining a single attribute.
0 commit comments