summaryrefslogtreecommitdiff
path: root/app/controllers/groups_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r--app/controllers/groups_controller.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 9dc9afe9e67..caf8ef85e87 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -73,15 +73,7 @@ class GroupsController < ApplicationController
end
def update
- group_params = params[:group].dup
- owner_id = group_params.delete(:owner_id)
-
- if owner_id
- @group.owner = User.find(owner_id)
- @group.save
- end
-
- if @group.update_attributes(group_params)
+ if @group.update_attributes(params[:group])
redirect_to @group, notice: 'Group was successfully updated.'
else
render action: "edit"