@@ -36,10 +36,10 @@ def serializable_hash(options = nil)
36
36
37
37
add_links ( options )
38
38
else
39
- resource_objects = resource_objects_for ( serializer , options )
39
+ primary_data = primary_data_for ( serializer , options )
40
40
relationships = relationships_for ( serializer )
41
41
included = included_for ( serializer )
42
- @hash [ :data ] = resource_objects
42
+ @hash [ :data ] = primary_data
43
43
@hash [ :data ] [ :relationships ] = relationships if relationships . any?
44
44
@hash [ :included ] = included if included . any?
45
45
end
@@ -87,7 +87,7 @@ def resource_object_for(serializer, options = {})
87
87
end
88
88
end
89
89
90
- def resource_objects_for ( serializer , options )
90
+ def primary_data_for ( serializer , options )
91
91
if serializer . respond_to? ( :each )
92
92
serializer . map { |s | resource_object_for ( s , options ) }
93
93
else
@@ -126,10 +126,10 @@ def _included_for(resource_name, serializer, parent = nil)
126
126
resource_path = [ parent , resource_name ] . compact . join ( '.' )
127
127
128
128
if include_assoc? ( resource_path )
129
- resource_object = resource_object_for ( serializer , @options )
129
+ primary_data = primary_data_for ( serializer , @options )
130
130
relationships = relationships_for ( serializer )
131
- resource_object [ :relationships ] = relationships if relationships . any?
132
- result . push ( resource_object )
131
+ primary_data [ :relationships ] = relationships if relationships . any?
132
+ result . push ( primary_data )
133
133
end
134
134
135
135
if include_nested_assoc? ( resource_path )
0 commit comments