Skip to content

Commit

Permalink
Merge pull request #5 from jeregrine/rendering_one_map
Browse files Browse the repository at this point in the history
returning an indiviudal resource should be a map, not a list
  • Loading branch information
Jason S. committed Jun 21, 2015
2 parents 0b62ef7 + cb3d81f commit 4ca7882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jsonapi.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule JSONAPI do

defp data_one(doc, data, mod) do
{data, included} = encode(data, mod)
{Dict.put(doc, :data, [data]), included}
{Dict.put(doc, :data, data), included}
end

defp as_relationship(data, mod) when is_list(data) do
Expand Down

0 comments on commit 4ca7882

Please sign in to comment.