Skip to content

Commit ef16f1d

Browse files
committed
Remove unneeded relationship_data method
1 parent e385293 commit ef16f1d

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

lib/jsonapi/resource_serializer.rb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def object_hash(source, include_directives)
108108
attributes = attribute_hash(source)
109109
obj_hash['attributes'] = attributes unless attributes.empty?
110110

111-
relationships = relationships_hash(source, include_directives)
111+
relationships = relationship_data(source, include_directives)
112112
obj_hash['relationships'] = relationships unless relationships.nil? || relationships.empty?
113113

114114
return obj_hash
@@ -133,18 +133,6 @@ def attribute_hash(source)
133133
end
134134
end
135135

136-
def relationships_hash(source, include_directives)
137-
rel_hash = {}
138-
139-
links = relationship_links(source)
140-
rel_hash['links'] = links unless links.empty?
141-
142-
data = relationship_data(source, include_directives)
143-
rel_hash['data'] = data unless data.empty?
144-
145-
# links_hash(source, include_directives)
146-
end
147-
148136
def relationship_data(source, include_directives)
149137
associations = source.class._associations
150138
requested = requested_fields(source.class._type)

0 commit comments

Comments
 (0)