summaryrefslogtreecommitdiff
path: root/chef-server-api
diff options
context:
space:
mode:
authorSeth Falcon <seth@opscode.com>2010-08-16 09:46:33 -0700
committerSeth Falcon <seth@opscode.com>2010-11-01 10:44:44 -0700
commit5e85014530dae6853c3b4337e6bf717369bc4673 (patch)
tree5c066297f67dc73dcc8c92bc6fc87215716177cc /chef-server-api
parent8aaaece275ff97702f0f1085d22608a0eb8062af (diff)
downloadchef-5e85014530dae6853c3b4337e6bf717369bc4673.tar.gz
Move update logic from roles controller to role model object
Diffstat (limited to 'chef-server-api')
-rw-r--r--chef-server-api/app/controllers/roles.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/chef-server-api/app/controllers/roles.rb b/chef-server-api/app/controllers/roles.rb
index ac71bb30a3..180b7cbe81 100644
--- a/chef-server-api/app/controllers/roles.rb
+++ b/chef-server-api/app/controllers/roles.rb
@@ -48,11 +48,7 @@ class Roles < Application
raise NotFound, "Cannot load role #{params[:id]}"
end
- @role.description(params["inflated_object"].description)
- @role.recipes(params["inflated_object"].recipes) if defined?(params["inflated_object"].recipes)
- @role.run_list(params["inflated_object"].run_list)
- @role.default_attributes(params["inflated_object"].default_attributes)
- @role.override_attributes(params["inflated_object"].override_attributes)
+ @role.update_from!(params["inflated_object"])
@role.cdb_save
self.status = 200
@role.couchdb_rev = nil