Skip to content

Commit 3ba4386

Browse files
committed
Root is always "data" for jsonapi
1 parent b68d7f4 commit 3ba4386

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_model/serializer/adapter/json_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def initialize(serializer, options = {})
1616
end
1717

1818
def serializable_hash(options = {})
19-
@root = (@options[:root] || serializer.json_key.to_s.pluralize).to_sym
19+
@root = 'data'
2020

2121
if serializer.respond_to?(:each)
2222
@hash[@root] = serializer.map do |s|

0 commit comments

Comments
 (0)