summaryrefslogtreecommitdiff
path: root/lib/chef_zero/endpoints/rest_object_endpoint.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-05-27 08:38:16 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-05-27 08:38:16 -0700
commit28042a7cda795941be677d1543bde149854feef0 (patch)
tree0c85e6942bcf65bdb89a74b9eca7a56177e31bb9 /lib/chef_zero/endpoints/rest_object_endpoint.rb
parent08f80dd5c9cc1cd72be7d1566cce61f9754aaa4d (diff)
downloadchef-zero-28042a7cda795941be677d1543bde149854feef0.tar.gz
Get memory data store pedant clean
Diffstat (limited to 'lib/chef_zero/endpoints/rest_object_endpoint.rb')
-rw-r--r--lib/chef_zero/endpoints/rest_object_endpoint.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef_zero/endpoints/rest_object_endpoint.rb b/lib/chef_zero/endpoints/rest_object_endpoint.rb
index f301a99..de280a8 100644
--- a/lib/chef_zero/endpoints/rest_object_endpoint.rb
+++ b/lib/chef_zero/endpoints/rest_object_endpoint.rb
@@ -26,7 +26,7 @@ module ChefZero
rename = key != request.rest_path[-1]
if rename
begin
- data_store.create(request.rest_path[0..-2] + [key], request.body)
+ data_store.create(request.rest_path[0..-2], key, request.body)
rescue DataStore::DataAlreadyExistsError
return error(409, "Cannot rename '#{request.rest_path[-1]}' to '#{key}': '#{key}' already exists")
end