Skip to content

Commit

Permalink
Removes a dodgy flatten frm the read_many method
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neighman committed Jul 22, 2008
1 parent e722aba commit dc46682
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion merb-rest-client/lib/merb_rest_adapter.rb
Expand Up @@ -50,7 +50,7 @@ def read_many(query)
result = api_get(resource_name(query).to_s, parameters)
hash = parse_results(result.body)

collection.load([hash].flatten)
collection.load(hash)
end
end

Expand Down
2 changes: 1 addition & 1 deletion merb-rest-client/spec/merb_rest_adapter_spec.rb
Expand Up @@ -69,7 +69,7 @@ def self.default_repository_name

describe "read_many" do
before(:all) do
@hash = {"title" => "title", "body" => "body", "id" => 3}
@hash = [{"title" => "title", "body" => "body", "id" => 3}]
@json = JSON.generate(@hash)

end
Expand Down

0 comments on commit dc46682

Please sign in to comment.