lib/yao/resources/restfully_accessible.rb in yao-0.9.0 vs lib/yao/resources/restfully_accessible.rb in yao-0.9.1
- old
+ new
@@ -86,13 +86,11 @@
create_url
end
json = GET(url, query).body
if return_single_on_querying && !query.empty?
- # returns Yao::Resources::*
- resource_from_json(json)
+ [resource_from_json(json)]
else
- # returns Array of Yao::Resources::*
resources_from_json(json)
end
end
# @note .list is defined to keep backward compatibility and will be deprecated