diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-03-17 19:42:46 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-03-17 19:42:46 -0300 |
commit | 0a7f7161198feaa9a4cae7c16669a0e6187aed33 (patch) | |
tree | 445dcbd9f473be2af293a299b634525725a70666 /app/controllers/groups_controller.rb | |
parent | a18ac62756573a2da2c42ca50b6f30033be6fa63 (diff) | |
download | gitlab-ce-0a7f7161198feaa9a4cae7c16669a0e6187aed33.tar.gz |
Code fixes
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r-- | app/controllers/groups_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 8243946c852..ba2057eb2c8 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -28,9 +28,9 @@ class GroupsController < Groups::ApplicationController end def create - @group = Group.new(group_params) + @group = Groups::CreateService.new(current_user, group_params).execute - if Groups::CreateService.new(@group, current_user, group_params).execute + if @group.persisted? redirect_to @group, notice: "Group '#{@group.name}' was successfully created." else render action: "new" |