mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
pluralising root key when using arraySerializer
This commit is contained in:
@@ -13,7 +13,7 @@ module ActiveModel
|
||||
|
||||
def fields_for(serializer)
|
||||
key = serializer.json_key
|
||||
fields[key.to_sym]
|
||||
fields[key.to_sym] || fields[key.pluralize.to_sym]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user