mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Fix support for custom root in JSON-API adapter
This commit is contained in:
@@ -8,7 +8,7 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def serializable_hash(options = {})
|
||||
@root = (options[:root] || serializer.json_key).to_s.pluralize.to_sym
|
||||
@root = (options[:root] || serializer.json_key.to_s.pluralize).to_sym
|
||||
@hash = {}
|
||||
|
||||
if serializer.respond_to?(:each)
|
||||
|
||||
Reference in New Issue
Block a user