Skip to content

Commit

Permalink
Remove legacy method accidentally reintroduced in rails-api#1017.
Browse files Browse the repository at this point in the history
  • Loading branch information
beauby committed Sep 14, 2015
1 parent 1ac82a1 commit 319a907
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/active_model/serializer/adapter/json_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ def resource_identifier_type_for(serializer)
end
end

def add_relationships(resource, name, serializers)
resource[:relationships] ||= {}
resource[:relationships][name] ||= { data: [] }
resource[:relationships][name][:data] += serializers.map { |serializer| { type: serializer.json_api_type, id: serializer.id.to_s } }
end

def resource_identifier_id_for(serializer)
if serializer.respond_to?(:id)
serializer.id
Expand Down

0 comments on commit 319a907

Please sign in to comment.