Skip to content

Commit 09a4f80

Browse files
committed
Comment cleanup
1 parent 647b108 commit 09a4f80

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

lib/jsonapi/resource_serializer.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,21 +114,15 @@ def process_primary(source, requested_associations)
114114

115115
resource = source
116116
id = resource.id
117-
# ToDo: See if this is actually needed
118-
# if already_serialized?(@primary_class_name, id)
119-
# set_primary(@primary_class_name, id)
120-
# end
121-
122117
add_included_object(@primary_class_name, id, object_hash(source, requested_associations), true)
123118
end
124119
end
125120

126-
# Returns a serialized hash for the source model, with
121+
# Returns a serialized hash for the source model
127122
def object_hash(source, requested_associations)
128123
obj_hash = attribute_hash(source)
129124
links = links_hash(source, requested_associations)
130125

131-
# ToDo: Do we format these required keys
132126
obj_hash[format_key('type')] = format_value(source.class._type.to_s, :default, source)
133127
obj_hash[format_key('id')] ||= format_value(source.id, :id, source)
134128
obj_hash.merge!({links: links}) unless links.empty?

0 commit comments

Comments
 (0)